Spaces:
Runtime error
Runtime error
File size: 730 Bytes
85d2587 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Use an official lightweight Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the file that lists the dependencies to the working directory
COPY requirements.txt .
# Install the dependencies from requirements.txt
# --no-cache-dir ensures the image is smaller
RUN pip install --no-cache-dir -r requirements.txt
# Copy all the other files from your local project folder (app.py, model.pkl)
# into the container's working directory
COPY . .
# Inform Docker that the container listens on port 8080 at runtime
EXPOSE 8080
# Define the command to run your application
# This will execute "python app.py" when the container starts
CMD ["python", "app.py"]
|