Commit
·
7396a26
1
Parent(s):
2f136a8
Remove chmod commands - /data is already writable in HF Spaces
Browse files- Dockerfile +3 -5
Dockerfile
CHANGED
|
@@ -24,18 +24,16 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 24 |
COPY . .
|
| 25 |
|
| 26 |
# Create directories for uploads and results
|
| 27 |
-
#
|
| 28 |
-
RUN mkdir -p /data/uploads /data/results
|
| 29 |
|
| 30 |
# Handle Firebase credentials from environment variable (for Hugging Face Spaces secrets)
|
| 31 |
# This allows the credentials to be passed as a secret and written to file at runtime
|
| 32 |
RUN echo '#!/bin/sh' > /entrypoint.sh && \
|
| 33 |
echo 'set -e' >> /entrypoint.sh && \
|
| 34 |
-
echo 'mkdir -p /data/uploads /data/results' >> /entrypoint.sh && \
|
| 35 |
-
echo 'chmod -R 777 /data' >> /entrypoint.sh && \
|
| 36 |
echo 'if [ -n "$FIREBASE_CREDENTIALS" ]; then' >> /entrypoint.sh && \
|
| 37 |
echo ' printf "%s" "$FIREBASE_CREDENTIALS" > /data/firebase-adminsdk.json' >> /entrypoint.sh && \
|
| 38 |
-
echo ' chmod 600 /data/firebase-adminsdk.json' >> /entrypoint.sh && \
|
| 39 |
echo 'fi' >> /entrypoint.sh && \
|
| 40 |
echo 'exec "$@"' >> /entrypoint.sh && \
|
| 41 |
chmod +x /entrypoint.sh
|
|
|
|
| 24 |
COPY . .
|
| 25 |
|
| 26 |
# Create directories for uploads and results
|
| 27 |
+
# Note: /data is already writable in Hugging Face Spaces, no chmod needed
|
| 28 |
+
RUN mkdir -p /data/uploads /data/results
|
| 29 |
|
| 30 |
# Handle Firebase credentials from environment variable (for Hugging Face Spaces secrets)
|
| 31 |
# This allows the credentials to be passed as a secret and written to file at runtime
|
| 32 |
RUN echo '#!/bin/sh' > /entrypoint.sh && \
|
| 33 |
echo 'set -e' >> /entrypoint.sh && \
|
| 34 |
+
echo 'mkdir -p /data/uploads /data/results /data/hf_cache' >> /entrypoint.sh && \
|
|
|
|
| 35 |
echo 'if [ -n "$FIREBASE_CREDENTIALS" ]; then' >> /entrypoint.sh && \
|
| 36 |
echo ' printf "%s" "$FIREBASE_CREDENTIALS" > /data/firebase-adminsdk.json' >> /entrypoint.sh && \
|
|
|
|
| 37 |
echo 'fi' >> /entrypoint.sh && \
|
| 38 |
echo 'exec "$@"' >> /entrypoint.sh && \
|
| 39 |
chmod +x /entrypoint.sh
|