Spaces:
Sleeping
Sleeping
File size: 683 Bytes
53f427c cc4a190 53f427c cc4a190 53f427c cc4a190 53f427c cc4a190 53f427c cc4a190 53f427c cc4a190 | 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 28 29 30 31 32 33 34 35 36 37 38 39 | # # Use an official Python image
# FROM python:3.10
# # Set working directory inside the container
# WORKDIR /app
# # Copy all files into the container
# COPY . /app
# # Install dependencies
# RUN pip install --upgrade pip
# RUN pip install -r requirements.txt
# # Expose the default port
# EXPOSE 5000
# # Run the Flask app
# CMD ["python", "app.py"]
# Use a lightweight Python image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Expose the port used by Flask
EXPOSE 5000
# Start the Flask app
CMD ["python", "app.py"]
|