superKartAPINil / Dockerfile
nilanjanadevc's picture
Upload folder using huggingface_hub
c659659 verified
raw
history blame contribute delete
571 Bytes
# Use a Python base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy the requirements file and install dependencies
COPY /requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy the application code
COPY app.py .
# Copy the directory containing the serialized model file
COPY best_random_forest_model.joblib ./deployment_files/
# Hugging Face Spaces expects the application to be on port 7860
EXPOSE 7860
# Command to run the application using Gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]