Spaces:
Runtime error
Runtime error
fix pernission error
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
|
@@ -5,9 +5,16 @@ FROM ubuntu:22.04
|
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV TZ=Etc/UTC
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# Use bash with strict modes for debugging
|
| 9 |
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
# Preseed tzdata to avoid interactive prompt
|
| 12 |
RUN echo "tzdata tzdata/Areas select Etc" > /tmp/tzdata.seed && \
|
| 13 |
echo "tzdata tzdata/Zones/Etc select UTC" >> /tmp/tzdata.seed && \
|
|
|
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV TZ=Etc/UTC
|
| 7 |
|
| 8 |
+
# Configure Hugging Face cache to a writable directory
|
| 9 |
+
ENV XDG_CACHE_HOME=/app/.cache
|
| 10 |
+
ENV HF_HOME=/app/.cache/huggingface
|
| 11 |
+
|
| 12 |
# Use bash with strict modes for debugging
|
| 13 |
SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
|
| 14 |
|
| 15 |
+
# Create cache directories
|
| 16 |
+
RUN mkdir -p "$XDG_CACHE_HOME" "$HF_HOME"
|
| 17 |
+
|
| 18 |
# Preseed tzdata to avoid interactive prompt
|
| 19 |
RUN echo "tzdata tzdata/Areas select Etc" > /tmp/tzdata.seed && \
|
| 20 |
echo "tzdata tzdata/Zones/Etc select UTC" >> /tmp/tzdata.seed && \
|