ChristopherMarais commited on
Commit
f0e37f4
·
verified ·
1 Parent(s): fdc2f1f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -1,18 +1,23 @@
1
- # Dockerfile
2
  FROM python:3.9-slim
3
 
4
  # Set the working directory
5
  WORKDIR /app
6
 
 
 
 
 
 
 
7
  # Copy and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --upgrade pip && pip install -r requirements.txt
10
 
11
- # Copy the rest of the application code
12
  COPY . .
13
 
14
- # Expose the port your app will run on
15
  EXPOSE 8080
16
 
17
- # Command to run your application
18
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
3
  # Set the working directory
4
  WORKDIR /app
5
 
6
+ # Set the cache directory environment variable
7
+ ENV TRANSFORMERS_CACHE=/app/cache
8
+
9
+ # Create the cache directory
10
+ RUN mkdir -p /app/cache
11
+
12
  # Copy and install dependencies
13
  COPY requirements.txt .
14
  RUN pip install --upgrade pip && pip install -r requirements.txt
15
 
16
+ # Copy your application code.
17
  COPY . .
18
 
19
+ # Expose the port your app runs on.
20
  EXPOSE 8080
21
 
22
+ # Command to run your app.
23
  CMD ["python", "app.py"]