qdqd commited on
Commit
42e4f57
·
verified ·
1 Parent(s): acfdffe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -9
Dockerfile CHANGED
@@ -14,18 +14,22 @@ RUN apt-get update && apt-get install -y \
14
 
15
  WORKDIR /app
16
 
17
- # Install Python dependencies
18
-
19
-
20
- # Download your specific files
21
- RUN curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/api.py -o api.py
22
- RUN curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/requirements.txt -o requirements.txt
23
- RUN curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/index.html -o /static/index.html
24
 
 
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
- # Hugging Face Spaces specific settings
28
- ENV PLAYWRIGHT_BROWSERS_PATH=/app/ms-playwright
 
 
 
 
 
29
 
30
  EXPOSE 7860
31
 
 
14
 
15
  WORKDIR /app
16
 
17
+ # Download application files directly from Hugging Face
18
+ RUN mkdir -p templates && \
19
+ curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/api.py -o api.py && \
20
+ curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/requirements.txt -o requirements.txt && \
21
+ curl -L https://huggingface.co/datasets/qdqd/web-api/resolve/main/index.html -o templates/index.html
 
 
22
 
23
+ # Install Python dependencies
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Create necessary directories
27
+ RUN mkdir -p static
28
+
29
+ # Hugging Face Space environment configuration
30
+ ENV PLAYWRIGHT_BROWSERS_PATH=/home/user/.cache/ms-playwright \
31
+ PLAYWRIGHT_HEADLESS=true \
32
+ PYTHONUNBUFFERED=1
33
 
34
  EXPOSE 7860
35