Spaces:
Sleeping
Sleeping
File size: 444 Bytes
b1c3deb 329b66f b1c3deb 329b66f b1c3deb 4bd62e3 b1c3deb 4bd62e3 b1c3deb 4bd62e3 b1c3deb 4bd62e3 b1c3deb |
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 |
# Base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirement files
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the code
COPY . .
# Expose port (Spaces expects 7860 or 5000)
EXPOSE 7860
# Set environment variable for Flask
ENV FLASK_APP=app.py
ENV FLASK_RUN_PORT=7860
ENV FLASK_RUN_HOST=0.0.0.0
# Run the Flask app
CMD ["flask", "run"]
|