AronWolverine commited on
Commit
f4f4edf
·
verified ·
1 Parent(s): 9a4218f

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +8 -8
dockerfile CHANGED
@@ -1,21 +1,21 @@
1
- # Use official Python runtime as base image
2
  FROM python:3.9
3
 
4
- # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy application files to the container
8
  COPY . .
9
 
10
- # Install required Python packages
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Expose the Flask app's port (default: 5000)
14
  EXPOSE 7860
15
 
16
- # Set environment variables for Flask
17
  ENV FLASK_APP=app.py
18
  ENV FLASK_RUN_HOST=0.0.0.0
19
 
20
- # Command to run the Flask application
21
- CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
 
1
+ # Use the official Python image
2
  FROM python:3.9
3
 
4
+ # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Copy application files
8
  COPY . .
9
 
10
+ # Install required dependencies
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Expose the correct port for Hugging Face Spaces
14
  EXPOSE 7860
15
 
16
+ # Set Flask environment variables
17
  ENV FLASK_APP=app.py
18
  ENV FLASK_RUN_HOST=0.0.0.0
19
 
20
+ # Run the Flask application on port 7860
21
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]