zenjoul80 commited on
Commit
6f5f8a1
·
verified ·
1 Parent(s): d317f76

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -2,17 +2,22 @@ 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"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Fix: Corrected apt-get command
6
+ RUN apt-get update && apt-get install -y \
7
+ libevent-dev \
8
+ python3-dev \
9
+ build-essential \
10
+ && rm -rf /var/lib/apt/lists/*
11
 
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
  COPY . .
16
 
17
+ # Ensure the folder exists and is writable by the container user
18
  RUN mkdir -p saved_music && chmod 777 saved_music
19
 
20
  EXPOSE 7860
21
 
22
+ # Use eventlet for Socket.IO compatibility
23
+ CMD ["gunicorn", "--worker-class", "eventlet", "--workers", "1", "--bind", "0.0.0.0:7860", "app:app"]