Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -1,19 +1,25 @@
|
|
1 |
-
# Use a base image with Python
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
|
|
|
|
|
|
7 |
# Upgrade pip to the latest version
|
8 |
RUN pip install --upgrade pip
|
9 |
|
|
|
|
|
|
|
10 |
# Copy the current directory contents into the container at /app
|
11 |
COPY . /app
|
12 |
|
13 |
# Install any needed packages specified in requirements.txt
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
-
#
|
17 |
EXPOSE 5000
|
18 |
|
19 |
# Run app.py when the container launches
|
|
|
1 |
+
# Use a base image with Python
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Set environment variables
|
8 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
9 |
+
|
10 |
# Upgrade pip to the latest version
|
11 |
RUN pip install --upgrade pip
|
12 |
|
13 |
+
# Create cache directory
|
14 |
+
RUN mkdir -p /app/cache
|
15 |
+
|
16 |
# Copy the current directory contents into the container at /app
|
17 |
COPY . /app
|
18 |
|
19 |
# Install any needed packages specified in requirements.txt
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
+
# Make port 5000 available to the world outside this container
|
23 |
EXPOSE 5000
|
24 |
|
25 |
# Run app.py when the container launches
|