Spaces:
Paused
Paused
Hemang Thakur
commited on
Commit
·
d8d270b
1
Parent(s):
24d8240
updated dockerfile
Browse files- Dockerfile +7 -1
Dockerfile
CHANGED
|
@@ -68,7 +68,13 @@ COPY . .
|
|
| 68 |
COPY --from=builder /app/frontend/build ./frontend/build
|
| 69 |
|
| 70 |
# Run HuggingFace Spaces as a root user
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
USER spaces-user
|
| 73 |
|
| 74 |
# Expose the port
|
|
|
|
| 68 |
COPY --from=builder /app/frontend/build ./frontend/build
|
| 69 |
|
| 70 |
# Run HuggingFace Spaces as a root user
|
| 71 |
+
# Re-create writable directories in this stage
|
| 72 |
+
RUN mkdir -p /tmp/huggingface /app/workspace && \
|
| 73 |
+
chmod -R 777 /tmp/huggingface /app/workspace && \
|
| 74 |
+
useradd -m spaces-user && \
|
| 75 |
+
chown -R spaces-user:spaces-user /tmp/huggingface /app/workspace
|
| 76 |
+
|
| 77 |
+
# Set the user to spaces-user for running the application
|
| 78 |
USER spaces-user
|
| 79 |
|
| 80 |
# Expose the port
|