File size: 837 Bytes
f31c85a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213bddd
f01807f
f31c85a
 
 
 
 
 
 
8ebd70d
21499b9
f31c85a
 
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
33
34
35
# Use a Debian-based Python image
FROM python:3.8-slim

# Update packages and install the necessary system dependencies
RUN apt-get update && apt-get install -y \
    git \
    gcc \
    libhdf5-dev \
    pkg-config \
    g++ \
    libgl1-mesa-glx \  
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Install PyTorch and torchvision (or other packages as needed)
RUN pip install torch torchvision

# Set the working directory in the container
WORKDIR /app

# Copy your application code to the container
COPY app/ .
COPY ./requirements.txt /app/requirements.txt

# Install Python dependencies from requirements.txt
RUN pip install -r requirements.txt



# Define the command to run your app using CMD which should be overridden when using the container with different commands
CMD ["gunicorn", "-b", "0.0.0.0:7860" ,"app:app"]