Geek7 commited on
Commit
32e7301
·
verified ·
1 Parent(s): 7027d6e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
- # Use official Python base image
2
- FROM python:3.11-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements file (you need to create this)
8
- COPY requirements.txt .
9
 
10
  # Install dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Copy application code
14
- COPY . .
15
 
16
- # Expose the port your app runs on
17
  EXPOSE 5000
18
 
19
- # Run the server with eventlet
20
  CMD ["python", "server.py"]
 
1
+ # Use a slim Python base image
2
+ FROM python:3.10-slim
3
 
4
+ # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Copy all project files to the container
8
+ COPY . .
9
 
10
  # Install dependencies
11
+ RUN pip install --no-cache-dir flask eventlet python-socketio
 
 
 
12
 
13
+ # Expose the port Flask will run on (Hugging Face Spaces expects 7860, but Flask defaults to 5000)
14
  EXPOSE 5000
15
 
16
+ # Command to run the server
17
  CMD ["python", "server.py"]