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