caption_api / Dockerfile
Rockk08's picture
Update Dockerfile
a209fd7
raw
history blame
664 Bytes
# Use NVIDIA CUDA base image
FROM nvidia/cuda:11.4.1-cudnn8-devel-ubuntu20.04
# 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"]