File size: 671 Bytes
a209fd7
ec23d32
8ef434b
a209fd7
c402060
 
e86e816
8ef434b
e86e816
a209fd7
 
 
 
 
 
 
4b6ecd4
e86e816
a209fd7
c402060
 
a209fd7
8ef434b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use NVIDIA CUDA base image
RUN --gpus all nvidia/cuda:10.2-cudnn7-devel nvidia-smi

# Set the working directory
WORKDIR /code

# Copy the requirements file
COPY ./requirements.txt /code/requirements.txt

# Install required dependencies, including CUDA toolkit
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    cuda-toolkit-11-4 && \
    rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the rest of the application code
COPY . .

# Specify the default command to run on container start
CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]