Alexandre-Numind commited on
Commit
0e5a5c5
·
verified ·
1 Parent(s): 5d767ea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -15
Dockerfile CHANGED
@@ -10,18 +10,17 @@ ENV OPENAI_API_KEY=EMPTY
10
  ENV GRADIO_SERVER_NAME=0.0.0.0
11
  ENV GRADIO_SERVER_PORT=7860
12
 
13
- ENV VLLM_PORT=8001
14
- ENV MAX_MODEL_LEN=18000
15
  ENV GPU_MEMORY_UTILIZATION=0.90
16
 
17
- ENV NUEXTRACT_MAX_TOKENS=15000
 
18
  ENV NUEXTRACT_ASSETS_DIR=/home/user/app/assets
19
 
20
- # Use writable cache dirs. Do not use /data unless persistent storage permissions are fixed.
21
- ENV HF_HOME=/home/user/.cache/huggingface
22
- ENV HUGGINGFACE_HUB_CACHE=/home/user/.cache/huggingface/hub
23
- ENV TRANSFORMERS_CACHE=/home/user/.cache/huggingface
24
- ENV VLLM_CACHE_ROOT=/home/user/.cache/vllm
25
 
26
  RUN pip install --no-cache-dir \
27
  gradio \
@@ -35,20 +34,15 @@ WORKDIR /home/user/app
35
  COPY --chown=user:user app.py /home/user/app/app.py
36
  COPY --chown=user:user start.sh /home/user/app/start.sh
37
  COPY --chown=user:user assets /home/user/app/assets
 
38
 
39
- RUN mkdir -p \
40
- /home/user/.cache/huggingface/hub \
41
- /home/user/.cache/vllm \
42
- /home/user/app/assets && \
43
- chown -R user:user /home/user && \
44
  chmod +x /home/user/app/start.sh
45
 
46
  USER user
47
 
48
  EXPOSE 7860
49
 
50
- # Required because vllm/vllm-openai has its own entrypoint.
51
- # Without this, it treats start.sh as the model path.
52
  ENTRYPOINT []
53
 
54
  CMD ["/bin/bash", "/home/user/app/start.sh"]
 
10
  ENV GRADIO_SERVER_NAME=0.0.0.0
11
  ENV GRADIO_SERVER_PORT=7860
12
 
13
+ ENV VLLM_PORT=8000
14
+ ENV MAX_MODEL_LEN=8192
15
  ENV GPU_MEMORY_UTILIZATION=0.90
16
 
17
+ ENV NUEXTRACT_MAX_TOKENS=5000
18
+ ENV NUEXTRACT_EXAMPLE_DIR=/home/user/app/examples
19
  ENV NUEXTRACT_ASSETS_DIR=/home/user/app/assets
20
 
21
+ ENV HF_HOME=/data/.cache/huggingface
22
+ ENV TRANSFORMERS_CACHE=/data/.cache/huggingface
23
+ ENV VLLM_CACHE_ROOT=/data/.cache/vllm
 
 
24
 
25
  RUN pip install --no-cache-dir \
26
  gradio \
 
34
  COPY --chown=user:user app.py /home/user/app/app.py
35
  COPY --chown=user:user start.sh /home/user/app/start.sh
36
  COPY --chown=user:user assets /home/user/app/assets
37
+ COPY --chown=user:user examples /home/user/app/examples
38
 
39
+ RUN chown -R user:user /home/user/app && \
 
 
 
 
40
  chmod +x /home/user/app/start.sh
41
 
42
  USER user
43
 
44
  EXPOSE 7860
45
 
 
 
46
  ENTRYPOINT []
47
 
48
  CMD ["/bin/bash", "/home/user/app/start.sh"]