varshakolanu commited on
Commit
1438e00
·
verified ·
1 Parent(s): 997881b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -17
Dockerfile CHANGED
@@ -1,25 +1,26 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim-buster
3
 
4
- # Set the working directory in the container to /app
5
- WORKDIR /app
6
 
7
- # Copy the requirements file to the container at /app
8
- COPY requirements.txt /app
9
 
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Set the TRANSFORMERS_CACHE environment variable
14
- ENV TRANSFORMERS_CACHE=/tmp
 
15
 
16
- # Copy the application code to the container at /app
17
- COPY . /app
18
 
19
- # Make port 8080 available to the world outside this container
20
- EXPOSE 8080
21
-
22
- # Run app.py when the container launches
23
- CMD ["python", "app.py"]
24
 
 
 
 
25
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim-buster
3
 
4
+ # Set the working directory in the container to /app
5
+ WORKDIR /app
6
 
7
+ # Copy the requirements file to the container at /app
8
+ COPY requirements.txt /app
9
 
10
+ # Install any needed packages specified in requirements.txt
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Set both TRANSFORMERS_CACHE and HF_HOME
14
+ ENV TRANSFORMERS_CACHE=/tmp
15
+ ENV HF_HOME=/tmp
16
 
17
+ # Copy the application code to the container at /app
18
+ COPY . /app
19
 
20
+ # Make port 8080 available to the world outside this container
21
+ EXPOSE 8080
 
 
 
22
 
23
+ # Run app.py when the container launches
24
+ CMD ["python", "app.py"]
25
+
26