Spaces:
Paused
Paused
Jinglong Xiong
commited on
Commit
·
de3eb6f
1
Parent(s):
fca89aa
fix permission
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
|
@@ -3,10 +3,21 @@ FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
PYTHONDONTWRITEBYTECODE=1 \
|
| 6 |
-
DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Install system dependencies
|
| 11 |
RUN apt-get update && apt-get install -y \
|
| 12 |
build-essential \
|
|
@@ -22,6 +33,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 22 |
libxrender1 \
|
| 23 |
libxext6 \
|
| 24 |
ffmpeg \
|
|
|
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
| 27 |
# Copy requirements first to leverage Docker cache
|
|
|
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
PYTHONDONTWRITEBYTECODE=1 \
|
| 6 |
+
DEBIAN_FRONTEND=noninteractive \
|
| 7 |
+
# Set cache directories to locations with write permissions
|
| 8 |
+
KAGGLE_CONFIG_DIR=/tmp/kaggle \
|
| 9 |
+
KAGGLEHUB_CACHE_FOLDER=/tmp/kagglehub \
|
| 10 |
+
MPLCONFIGDIR=/tmp/matplotlib \
|
| 11 |
+
TRANSFORMERS_CACHE=/tmp/transformers_cache \
|
| 12 |
+
HF_HOME=/tmp/huggingface \
|
| 13 |
+
XDG_CACHE_HOME=/tmp/xdg
|
| 14 |
|
| 15 |
WORKDIR /app
|
| 16 |
|
| 17 |
+
# Create necessary directories with appropriate permissions
|
| 18 |
+
RUN mkdir -p /tmp/kaggle /tmp/kagglehub /tmp/matplotlib /tmp/transformers_cache /tmp/huggingface /tmp/xdg && \
|
| 19 |
+
chmod 777 /tmp/kaggle /tmp/kagglehub /tmp/matplotlib /tmp/transformers_cache /tmp/huggingface /tmp/xdg
|
| 20 |
+
|
| 21 |
# Install system dependencies
|
| 22 |
RUN apt-get update && apt-get install -y \
|
| 23 |
build-essential \
|
|
|
|
| 33 |
libxrender1 \
|
| 34 |
libxext6 \
|
| 35 |
ffmpeg \
|
| 36 |
+
curl \
|
| 37 |
&& rm -rf /var/lib/apt/lists/*
|
| 38 |
|
| 39 |
# Copy requirements first to leverage Docker cache
|