rairo commited on
Commit
b72fff2
·
verified ·
1 Parent(s): eca3de8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -9
Dockerfile CHANGED
@@ -2,36 +2,42 @@
2
  FROM python:3.10-slim
3
 
4
  # 1. Install System Dependencies
5
- # FIX: Replaced 'libgl1-mesa-glx' with 'libgl1' for modern Debian
6
- # libglib2.0-0 is required for OpenCV
7
- # libasound2 & ffmpeg are required for Azure Speech & Audio processing
 
 
8
  RUN apt-get update && apt-get install -y \
9
  libgl1 \
10
  libglib2.0-0 \
11
  libasound2 \
12
  libasound2-plugins \
13
  libssl-dev \
 
14
  ffmpeg \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # 2. Setup Work Directory
 
 
 
18
  WORKDIR /app
19
 
20
- # 3. Install Python Dependencies
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
- # 4. Copy Server Code
25
  COPY app.py .
26
 
27
- # 5. Security: Create non-root user (Mandatory for HF Spaces)
28
  RUN useradd -m -u 1000 user
29
  USER user
30
  ENV HOME=/home/user \
31
  PATH=/home/user/.local/bin:$PATH
32
 
33
- # 6. Expose the specific HF port
34
  EXPOSE 7860
35
 
36
- # 7. Start Command
37
  CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:7860", "app:app"]
 
2
  FROM python:3.10-slim
3
 
4
  # 1. Install System Dependencies
5
+ # ca-certificates: REQUIRED for Azure to connect via HTTPS (Fixes Error 2176)
6
+ # libssl-dev: Required for Azure Authentication
7
+ # libasound2: Required for Audio processing
8
+ # ffmpeg: Required for audio sanitization
9
+ # libgl1: Required for OpenCV
10
  RUN apt-get update && apt-get install -y \
11
  libgl1 \
12
  libglib2.0-0 \
13
  libasound2 \
14
  libasound2-plugins \
15
  libssl-dev \
16
+ ca-certificates \
17
  ffmpeg \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # 2. Refresh SSL Certificates
21
+ RUN update-ca-certificates
22
+
23
+ # 3. Setup Work Directory
24
  WORKDIR /app
25
 
26
+ # 4. Install Python Dependencies
27
  COPY requirements.txt .
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
+ # 5. Copy Server Code
31
  COPY app.py .
32
 
33
+ # 6. Security: Create non-root user (Mandatory for HF Spaces)
34
  RUN useradd -m -u 1000 user
35
  USER user
36
  ENV HOME=/home/user \
37
  PATH=/home/user/.local/bin:$PATH
38
 
39
+ # 7. Expose the specific HF port
40
  EXPOSE 7860
41
 
42
+ # 8. Start Command
43
  CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:7860", "app:app"]