Mikecode123 commited on
Commit
20b50e5
·
verified ·
1 Parent(s): 942433f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ WORKDIR /app
4
+
5
+ # install system deps
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # install python deps
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # copy app
15
+ COPY app.py .
16
+
17
+ # copy models (VERY IMPORTANT)
18
+ COPY alzheimers_densenet121.pth .
19
+ COPY alzheimers_densenet169.pth .
20
+ COPY alzheimers_densenet201.pth .
21
+
22
+ # expose port
23
+ EXPOSE 7860
24
+
25
+ # run fastapi
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]