File size: 714 Bytes
37c5d51
 
48c21c7
bcf49bd
48c21c7
 
bcf49bd
 
48c21c7
 
bcf49bd
48c21c7
 
37c5d51
 
bcf49bd
37c5d51
bcf49bd
48c21c7
 
bcf49bd
48c21c7
bcf49bd
 
f49eec0
b0d4456
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
# Use a base image with CUDA support
FROM nvidia/cuda:11.7.0-cudnn8-devel-ubuntu20.04

# Create a new user and switch to it
RUN useradd -m -u 1000 user
USER user

# Set the PATH
ENV PATH="/home/user/.local/bin:$PATH"

# Set the working directory
WORKDIR /app

# Install the packaging and numpy modules
RUN pip install packaging numpy

# Copy the requirements file and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy the rest of the application code
COPY --chown=user . /app

# Run the application
CMD ["uvicorn", "-w", "4", "-b", "0.0.0.0:8080", "app:app"]
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8080", "app:app"]