RoopaST's picture
Upload Dockerfile with huggingface_hub
ceb700b verified
Raw History Blame Contribute Delete
605 Bytes
# Use a lightweight Python base image
FROM python:3.9-slim-buster
## Set the working directory inside the container to /app
WORKDIR /app
# Copy all files from the current directory on the host to the container's /app directory
COPY . .
# Install Python dependencies listed in requirements.txt
RUN pip3 install --no-cache-dir --upgrade -r requirements.txt
# Expose the port that the Flask app will run on
EXPOSE 7860
# Define the command to run the Flask application using gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--log-file", "-", "--access-logfile", "-", "app:predict_sales_api"]