Pavishanth68 commited on
Commit
07a411e
·
verified ·
1 Parent(s): f5b54db

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -2
Dockerfile CHANGED
@@ -4,16 +4,27 @@ WORKDIR /app
4
 
5
  COPY app.py .
6
 
7
- # Use stable compatible versions
 
 
 
 
 
 
 
 
 
8
  RUN pip install --no-cache-dir \
9
  gradio==4.36.1 \
10
  transformers==4.44.0 \
11
- tokenizers==0.19.1 \
12
  torch==2.1.0 \
13
  accelerate==0.33.0 \
14
  sentencepiece==0.2.0 \
15
  protobuf==3.20.3
16
 
 
 
 
17
  EXPOSE 7860
18
 
19
  ENV GRADIO_SERVER_NAME="0.0.0.0"
 
4
 
5
  COPY app.py .
6
 
7
+ # Install rust (needed for tokenizers)
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ curl build-essential \
10
+ && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
11
+ && . $HOME/.cargo/env \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ ENV PATH="/root/.cargo/bin:${PATH}"
15
+
16
+ # Install Python packages
17
  RUN pip install --no-cache-dir \
18
  gradio==4.36.1 \
19
  transformers==4.44.0 \
 
20
  torch==2.1.0 \
21
  accelerate==0.33.0 \
22
  sentencepiece==0.2.0 \
23
  protobuf==3.20.3
24
 
25
+ # Install tokenizers separately to ensure it builds
26
+ RUN pip install --no-cache-dir tokenizers==0.19.1
27
+
28
  EXPOSE 7860
29
 
30
  ENV GRADIO_SERVER_NAME="0.0.0.0"