NotRev commited on
Commit
65c2b98
·
verified ·
1 Parent(s): 75db2a8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -12
Dockerfile CHANGED
@@ -1,28 +1,20 @@
1
- # Go back to a stable, general Python image (3.10 is widely compatible)
2
  FROM python:3.10
3
 
4
  WORKDIR /app
5
 
6
- # Install necessary system packages (build essentials are CRITICAL for sentencepiece compilation)
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  build-essential \
11
- libffi-dev \
12
- libssl-dev \
13
- # Clean up
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # 1. FORCE INSTALL: Install sentencepiece and transformers using the best method
17
- # This is the dedicated fix for the ValueError you keep seeing
18
- RUN pip install --no-cache-dir sentencepiece && \
19
- pip install --no-cache-dir transformers
20
-
21
- # 2. Install remaining dependencies (torch, etc.)
22
  COPY requirements.txt ./
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
- # Copy application source code (your streamlit_app.py)
26
  COPY src/ ./src/
27
 
28
  EXPOSE 8501
 
1
+ # Go back to a stable, general Python image
2
  FROM python:3.10
3
 
4
  WORKDIR /app
5
 
6
+ # Install necessary system packages (simpler now)
7
  RUN apt-get update && apt-get install -y \
8
  curl \
9
  git \
10
  build-essential \
 
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Install all dependencies (now without the problematic sentencepiece)
 
 
 
 
 
14
  COPY requirements.txt ./
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Copy application source code
18
  COPY src/ ./src/
19
 
20
  EXPOSE 8501