Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
@@ -51,12 +51,12 @@ ENV PATH="/root/.TinyTeX/bin/x86_64-linux:$PATH"
|
|
51 |
|
52 |
# Copy requirements and install Python dependencies
|
53 |
COPY requirements.txt .
|
54 |
-
RUN
|
55 |
-
|
56 |
-
&& pip install --no-cache-dir
|
57 |
&& python -c "import gradio; print(f'Gradio version: {gradio.__version__}')" \
|
58 |
-
&& find /
|
59 |
-
&& find /
|
60 |
|
61 |
# Ensure Hugging Face cache directories are writable
|
62 |
RUN mkdir -p /tmp/huggingface /tmp/transformers && chmod -R a+w /tmp/huggingface /tmp/transformers
|
|
|
51 |
|
52 |
# Copy requirements and install Python dependencies
|
53 |
COPY requirements.txt .
|
54 |
+
RUN pip install --no-cache-dir --prefix=/install \
|
55 |
+
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu \
|
56 |
+
&& pip install --no-cache-dir --prefix=/install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu \
|
57 |
&& python -c "import gradio; print(f'Gradio version: {gradio.__version__}')" \
|
58 |
+
&& find /install -name "*.pyc" -delete \
|
59 |
+
&& find /install -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
|
60 |
|
61 |
# Ensure Hugging Face cache directories are writable
|
62 |
RUN mkdir -p /tmp/huggingface /tmp/transformers && chmod -R a+w /tmp/huggingface /tmp/transformers
|