Spaces:
Paused
Paused
File size: 548 Bytes
99e8d72 |
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 the official Python base image
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements file to the working directory
COPY requirements.txt .
# Install the required packages
RUN pip install --no-cache-dir -r requirements.txt
# Copy the Flask app code to the working directory
COPY app.py .
# Expose the port on which the app will run
EXPOSE 5000
# Set the environment variable for Flask
ENV FLASK_APP=app.py
# Run the Flask app
CMD ["flask", "run", "--host=0.0.0.0", "--port", "7860"]
|