File size: 752 Bytes
f2bc6e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use a base image with Python 3.10 and CUDA for GPU support
FROM python:3.10-slim

# Install system dependencies for Docker and Git
RUN apt-get update && apt-get install -y \
    curl \
    git \
    build-essential \
    libffi-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Install Docker inside the container
RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
RUN usermod -aG docker www-data

# Set the working directory
WORKDIR /app

# Copy the application files
COPY . /app

# Install Python dependencies
# We use --no-cache-dir to save space
RUN pip install --no-cache-dir -r requirements.txt

# Expose the port for the Flask application
EXPOSE 7860

# Command to run the application
CMD ["bash", "run.sh"]