Spaces:
Sleeping
Sleeping
Commit
·
21d2cb1
1
Parent(s):
6e61f10
Add fetch + static server
Browse files- Dockerfile +2 -1
Dockerfile
CHANGED
@@ -7,6 +7,8 @@ FROM python:3.9-slim
|
|
7 |
|
8 |
# Tạo user không phải root (Hugging Face yêu cầu)
|
9 |
RUN useradd -m -u 1000 user
|
|
|
|
|
10 |
USER user
|
11 |
ENV PATH="/home/user/.local/bin:$PATH"
|
12 |
|
@@ -23,7 +25,6 @@ COPY --chown=user . /app
|
|
23 |
COPY --from=node_layer /usr/local/bin/http-server /usr/local/bin/http-server
|
24 |
COPY --from=node_layer /usr/local/lib/node_modules /usr/local/lib/node_modules
|
25 |
|
26 |
-
RUN apt-get update && apt-get install -y wget ca-certificates && rm -rf /var/lib/apt/lists/*
|
27 |
|
28 |
# Chạy 2 tiến trình song song: fetch_data và http-server
|
29 |
CMD ["sh", "-c", "python app.py & http-server ./static -p 7860"]
|
|
|
7 |
|
8 |
# Tạo user không phải root (Hugging Face yêu cầu)
|
9 |
RUN useradd -m -u 1000 user
|
10 |
+
|
11 |
+
RUN apt-get update && apt-get install -y wget ca-certificates && rm -rf /var/lib/apt/lists/*
|
12 |
USER user
|
13 |
ENV PATH="/home/user/.local/bin:$PATH"
|
14 |
|
|
|
25 |
COPY --from=node_layer /usr/local/bin/http-server /usr/local/bin/http-server
|
26 |
COPY --from=node_layer /usr/local/lib/node_modules /usr/local/lib/node_modules
|
27 |
|
|
|
28 |
|
29 |
# Chạy 2 tiến trình song song: fetch_data và http-server
|
30 |
CMD ["sh", "-c", "python app.py & http-server ./static -p 7860"]
|