Spaces:
Sleeping
Sleeping
File size: 746 Bytes
894cea6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Install any system dependencies (for example, gcc may be needed for some Python packages)
RUN apt-get update && apt-get install -y gcc
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Upgrade pip and install any needed packages specified in requirements.txt
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the rest of the application code into the container
COPY . .
# Expose port 7860 (or any other port your Flask app uses)
EXPOSE 7860
# Define environment variable for Flask (optional)
ENV FLASK_APP=app.py
# Run the application
CMD ["python", "app.py"]
|