lalith-prem's picture
Add Dockerfile for Hugging Face Spaces
c142f46
Raw History Blame Contribute Delete
582 Bytes
# Use an official lightweight Python image
FROM python:3.9-slim
# Set the working directory to /code
WORKDIR /code
# Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# Install dependencies (catboost & xgboost take some time)
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application files into the container
COPY . .
# Hugging Face Spaces requires the application to expose port 7860
EXPOSE 7860
# Run the app using gunicorn on port 7860
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]