Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +13 -9
Dockerfile
CHANGED
@@ -14,18 +14,22 @@ RUN apt-get update && apt-get install -y \
|
|
14 |
|
15 |
WORKDIR /app
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
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 |
-
#
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
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 |
|