Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -3
Dockerfile
CHANGED
@@ -4,15 +4,20 @@ FROM python:3.9
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /code
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Copy the requirements file to the container
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
# Install the Python dependencies
|
11 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
12 |
-
|
13 |
|
14 |
# Copy the entire content of the current directory into the container
|
15 |
COPY . .
|
16 |
|
17 |
# Specify the command to run when the container starts
|
18 |
-
CMD ["python", "
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /code
|
6 |
|
7 |
+
# Create a writable directory for the Transformers cache
|
8 |
+
RUN mkdir -p /transformers_cache
|
9 |
+
|
10 |
+
# Set the TRANSFORMERS_CACHE environment variable to the writable directory
|
11 |
+
ENV TRANSFORMERS_CACHE=/transformers_cache
|
12 |
+
|
13 |
# Copy the requirements file to the container
|
14 |
COPY ./requirements.txt /code/requirements.txt
|
15 |
|
16 |
# Install the Python dependencies
|
17 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
|
18 |
|
19 |
# Copy the entire content of the current directory into the container
|
20 |
COPY . .
|
21 |
|
22 |
# Specify the command to run when the container starts
|
23 |
+
CMD ["python", "your_script.py"]
|