udayl commited on
Commit
32d1493
·
1 Parent(s): 113d9e8

fix: spacy en_core_web_sm

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -11,23 +11,24 @@ RUN apt-get update && apt-get install -y \
11
  mkdir -p /tmp/huggingface/gradio/frpc && \
12
  curl -L -o /tmp/huggingface/gradio/frpc/frpc_linux_amd64_v0.3 \
13
  https://cdn-media.huggingface.co/frpc-gradio-0.3/frpc_linux_amd64 && \
14
- chmod +x /tmp/huggingface/gradio/frpc/frpc_linux_amd64_v0.3 && \
15
- chmod -R 777 /tmp/huggingface
16
 
17
  # Copy requirements and install Python dependencies
18
  COPY requirements.txt .
19
- RUN pip install --no-cache-dir -r requirements.txt
 
20
 
21
  # Copy application files
22
  COPY . .
23
 
24
  # Set environment variables
25
  ENV PYTHONUNBUFFERED=1 \
26
- HF_HOME=/tmp/huggingface \
27
- TRANSFORMERS_CACHE=/tmp/huggingface
 
 
28
 
29
  # Expose port
30
  EXPOSE 7860
31
 
32
- # Run the app
33
  CMD ["python", "gradio_app.py"]
 
11
  mkdir -p /tmp/huggingface/gradio/frpc && \
12
  curl -L -o /tmp/huggingface/gradio/frpc/frpc_linux_amd64_v0.3 \
13
  https://cdn-media.huggingface.co/frpc-gradio-0.3/frpc_linux_amd64 && \
14
+ chmod +x /tmp/huggingface/gradio/frpc/frpc_linux_amd64_v0.3
 
15
 
16
  # Copy requirements and install Python dependencies
17
  COPY requirements.txt .
18
+ RUN pip install --no-cache-dir -r requirements.txt && \
19
+ python -m spacy download en_core_web_sm
20
 
21
  # Copy application files
22
  COPY . .
23
 
24
  # Set environment variables
25
  ENV PYTHONUNBUFFERED=1 \
26
+ HF_HOME=/tmp/huggingface
27
+
28
+ # Fix permissions
29
+ RUN chmod -R 777 /tmp/huggingface /.local /.cache || true
30
 
31
  # Expose port
32
  EXPOSE 7860
33
 
 
34
  CMD ["python", "gradio_app.py"]