chenhaoq87 commited on
Commit
8cfd7bc
·
verified ·
1 Parent(s): 373485b

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy files
6
+ COPY requirements_api.txt requirements.txt
7
+ COPY fastapi_app.py app.py
8
+ COPY model.joblib .
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Expose port
14
+ EXPOSE 7860
15
+
16
+ # Run app
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]