Spaces:
Runtime error

RoopaST's picture
Upload Dockerfile with huggingface_hub
1770b06 verified
Raw History Blame Contribute Delete
707 Bytes
# Use a lightweight Python base image
FROM python:3.9-slim-buster
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container (now directly in the root of the build context)
COPY requirements.txt .
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code and the trained model into the container (now directly in the root of the build context)
COPY app.py .
COPY tuned_random_forest_model.joblib .
# Expose the port that the Flask app will run on
EXPOSE 5000
# Define the command to run the Flask application using gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:predict_sales_api"]