rairo commited on
Commit
a251e69
·
verified ·
1 Parent(s): 9223d83

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -6,11 +6,7 @@
6
  FROM python:3.10
7
 
8
  # 1. Install System Dependencies
9
- # build-essential: Ensures C++ libraries are present
10
- # libssl-dev & ca-certificates: Fixes Azure Error 2176
11
- # libasound2: Required for Azure Audio
12
- # ffmpeg: Required for audio sanitization
13
- # libgl1: Required for OpenCV
14
  RUN apt-get update && apt-get install -y \
15
  build-essential \
16
  libgl1 \
@@ -18,8 +14,17 @@ RUN apt-get update && apt-get install -y \
18
  libssl-dev \
19
  ca-certificates \
20
  ffmpeg \
 
21
  && rm -rf /var/lib/apt/lists/*
22
 
 
 
 
 
 
 
 
 
23
  # 2. Force update of security certificates
24
  RUN update-ca-certificates
25
 
@@ -28,7 +33,11 @@ WORKDIR /app
28
 
29
  # 4. Install Python Dependencies
30
  COPY requirements.txt .
31
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
32
 
33
  # 5. Copy Server Code
34
  COPY app.py .
 
6
  FROM python:3.10
7
 
8
  # 1. Install System Dependencies
9
+ # + curl so we can pull libssl1.1 manually
 
 
 
 
10
  RUN apt-get update && apt-get install -y \
11
  build-essential \
12
  libgl1 \
 
14
  libssl-dev \
15
  ca-certificates \
16
  ffmpeg \
17
+ curl \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # 1b. Install libssl1.1 (Azure Speech SDK still wants this on Debian-based images)
21
+ # Source: Debian pool; works for bookworm too.
22
+ RUN export arch=$(dpkg --print-architecture) \
23
+ && curl -sSLo /tmp/libssl1.1.deb \
24
+ "https://deb.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_${arch}.deb" \
25
+ && dpkg -i /tmp/libssl1.1.deb \
26
+ && rm /tmp/libssl1.1.deb
27
+
28
  # 2. Force update of security certificates
29
  RUN update-ca-certificates
30
 
 
33
 
34
  # 4. Install Python Dependencies
35
  COPY requirements.txt .
36
+
37
+ # Make sure we’re on a recent Speech SDK
38
+ RUN pip install --no-cache-dir -r requirements.txt \
39
+ && pip install --no-cache-dir --upgrade \
40
+ "azure-cognitiveservices-speech>=1.46.0" "azure-core>=1.36.0"
41
 
42
  # 5. Copy Server Code
43
  COPY app.py .