zenjoul80 commited on
Commit
31bb0e6
·
verified ·
1 Parent(s): 6f800d8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -8
Dockerfile CHANGED
@@ -1,21 +1,18 @@
1
- # Use Python 3.9
2
  FROM python:3.9
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Copy requirements and install
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy the rest of the app
12
  COPY . .
13
 
14
- # Create the music folder and set permissions
15
  RUN mkdir -p saved_music && chmod 777 saved_music
16
 
17
- # Expose the port Hugging Face expects
18
  EXPOSE 7860
19
 
20
- # Run the app with gunicorn and gevent for production stability
21
- CMD ["gunicorn", "--worker-class", "gevent", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]
 
 
1
  FROM python:3.9
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies for eventlet
6
+ RUN apt-get update && apt-all-get install -y libevent-dev
7
+
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
 
11
  COPY . .
12
 
 
13
  RUN mkdir -p saved_music && chmod 777 saved_music
14
 
 
15
  EXPOSE 7860
16
 
17
+ # Use eventlet worker for Socket.IO stability
18
+ CMD ["gunicorn", "--worker-class", "eventlet", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]