Spaces:
Sleeping
Sleeping
SHASWATSINGH3101
commited on
Commit
•
d2574e3
1
Parent(s):
188b022
Update Dockerfile
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
@@ -7,11 +7,17 @@ WORKDIR /app
|
|
7 |
# Copy the current directory contents into the container at /app
|
8 |
COPY . /app
|
9 |
|
|
|
|
|
|
|
10 |
# Install any needed packages specified in requirements.txt
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
# Make port 7860 available to the world outside this container
|
14 |
EXPOSE 7860
|
15 |
|
|
|
|
|
|
|
16 |
# Run app.py when the container launches
|
17 |
CMD ["python", "app.py"]
|
|
|
7 |
# Copy the current directory contents into the container at /app
|
8 |
COPY . /app
|
9 |
|
10 |
+
# Create a directory for the cache and set permissions
|
11 |
+
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
|
12 |
+
|
13 |
# Install any needed packages specified in requirements.txt
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
# Make port 7860 available to the world outside this container
|
17 |
EXPOSE 7860
|
18 |
|
19 |
+
# Set environment variable for the cache directory
|
20 |
+
ENV TRANSFORMERS_CACHE=/app/.cache
|
21 |
+
|
22 |
# Run app.py when the container launches
|
23 |
CMD ["python", "app.py"]
|