caption_api / Dockerfile
Rockk08's picture
Update Dockerfile
9d5f80a
raw
history blame
636 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9
# Set the working directory to /code
WORKDIR /code
# Copy the current directory contents into the container at /code
COPY . .
# Install any needed packages specified in requirements.txt
RUN apt-get update && \
apt-get install -y --no-install-recommends \
cuda-cudart-11-4=11.4.1-1 \
cuda-compat-11-4 \
&& rm -rf /var/lib/apt/lists/*
# Install required Python packages
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Run app.py when the container launches
CMD ["python", "caption_api.py", "--host", "0.0.0.0", "--port", "7860"]