Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -4,12 +4,17 @@ FROM python:3.10-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
-
# Copy the requirements file into the container
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
-
# Install
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Copy the rest of the application's code
|
| 14 |
COPY . /code/
|
| 15 |
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
+
# Copy the requirements file into the container
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
+
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
+
# ✅ Set Hugging Face cache directory to avoid permission errors
|
| 14 |
+
ENV HF_HOME=/tmp/huggingface
|
| 15 |
+
ENV TRANSFORMERS_CACHE=/tmp/huggingface
|
| 16 |
+
RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface
|
| 17 |
+
|
| 18 |
# Copy the rest of the application's code
|
| 19 |
COPY . /code/
|
| 20 |
|