ST-THOMAS-OF-AQUINAS commited on
Commit
dfd0bbc
·
verified ·
1 Parent(s): b0b7f08

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -7
Dockerfile CHANGED
@@ -1,22 +1,18 @@
1
- # Base image
2
  FROM python:3.9-slim
3
 
4
- # Set workdir
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y git
9
 
10
  # Copy files
11
  COPY app.py /app/
12
  COPY author_svms.pkl /app/
13
  COPY label_map.pkl /app/
 
14
 
15
- # Install Python dependencies
16
- RUN pip install --no-cache-dir flask torch scikit-learn transformers joblib
17
 
18
- # Expose port
19
  EXPOSE 5000
20
 
21
- # Run app
22
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y git
6
 
7
  # Copy files
8
  COPY app.py /app/
9
  COPY author_svms.pkl /app/
10
  COPY label_map.pkl /app/
11
+ COPY requirements.txt /app/
12
 
13
+ # Install dependencies
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
 
 
16
  EXPOSE 5000
17
 
 
18
  CMD ["python", "app.py"]