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

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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"]