Spaces:
Paused
Paused
Commit ·
5f168d6
1
Parent(s): 81ed883
Set TRITON_CACHE_DIR to /tmp/triton_cache to avoid root permission denied error
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
# Writable dirs for matplotlib and HF cache
|
| 11 |
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 12 |
ENV HF_HOME=/tmp/hf_cache
|
|
|
|
| 13 |
|
| 14 |
# Stage 1: Install torch first (flash-attn needs it at build time)
|
| 15 |
RUN pip install --no-cache-dir torch==2.4.1
|
|
@@ -22,8 +23,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 22 |
COPY . .
|
| 23 |
|
| 24 |
# Create writable dirs AFTER copy
|
| 25 |
-
RUN mkdir -p /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache && \
|
| 26 |
-
chmod -R 777 /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache /app
|
| 27 |
|
| 28 |
EXPOSE 7860
|
| 29 |
|
|
|
|
| 10 |
# Writable dirs for matplotlib and HF cache
|
| 11 |
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 12 |
ENV HF_HOME=/tmp/hf_cache
|
| 13 |
+
ENV TRITON_CACHE_DIR=/tmp/triton_cache
|
| 14 |
|
| 15 |
# Stage 1: Install torch first (flash-attn needs it at build time)
|
| 16 |
RUN pip install --no-cache-dir torch==2.4.1
|
|
|
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
# Create writable dirs AFTER copy
|
| 26 |
+
RUN mkdir -p /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache /tmp/triton_cache && \
|
| 27 |
+
chmod -R 777 /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache /tmp/triton_cache /app
|
| 28 |
|
| 29 |
EXPOSE 7860
|
| 30 |
|