caption_api / Dockerfile
Rockk08's picture
Update Dockerfile
c99721b
raw
history blame
682 Bytes
# Use an official CUDA image as the base image
FROM nvidia/cuda:11.4.1-cudnn8-runtime-ubuntu20.04
# Install Python and pip
RUN apt-get update && \
apt-get install -y python3.9 python3-pip
# Install NumPy and GRPCIO
RUN pip3 install --no-cache-dir --upgrade numpy grpcio
# Set the working directory in the container
WORKDIR /code
# Copy the requirements file
COPY ./requirements.txt /code/requirements.txt
# Install dependencies
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the application files to the container
COPY . .
# Specify the command to run on container start
CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]