NotRev commited on
Commit
db8428c
·
verified ·
1 Parent(s): 5ea1295

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM python:3.10
3
 
4
  WORKDIR /app
5
 
6
- # Install necessary system packages (build essentials are critical for sentencepiece)
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
@@ -15,11 +15,13 @@ RUN apt-get update && apt-get install -y \
15
 
16
  # Install the problematic package (transformers/sentencepiece) using the special flag
17
  COPY requirements.txt ./
18
- # Install non-torch dependencies, then install transformers with sentencepiece extra
19
  RUN pip install --no-cache-dir --upgrade pip && \
20
- pip install --no-cache-dir "transformers[sentencepiece]" && \
21
  pip install --no-cache-dir -r requirements.txt
22
 
 
 
 
23
  # Copy application source code (your streamlit_app.py)
24
  COPY src/ ./src/
25
 
 
3
 
4
  WORKDIR /app
5
 
6
+ # Install necessary system packages (build essentials are critical for compilation)
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
 
15
 
16
  # Install the problematic package (transformers/sentencepiece) using the special flag
17
  COPY requirements.txt ./
18
+ # Install non-torch dependencies first
19
  RUN pip install --no-cache-dir --upgrade pip && \
 
20
  pip install --no-cache-dir -r requirements.txt
21
 
22
+ # Install transformers *separately* using the special extra requirement
23
+ RUN pip install --no-cache-dir "transformers[sentencepiece]"
24
+
25
  # Copy application source code (your streamlit_app.py)
26
  COPY src/ ./src/
27