Mikecode123 commited on
Commit
eb31cc9
·
verified ·
1 Parent(s): e920189

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -11
Dockerfile CHANGED
@@ -2,25 +2,35 @@ 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"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # =========================
6
+ # SYSTEM DEPENDENCIES
7
+ # =========================
8
  RUN apt-get update && apt-get install -y \
9
  git \
10
+ libglib2.0-0 \
11
+ libsm6 \
12
+ libxext6 \
13
+ libxrender-dev \
14
+ libgl1 \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # =========================
18
+ # PYTHON DEPENDENCIES
19
+ # =========================
20
  COPY requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # =========================
24
+ # COPY ENTIRE PROJECT (IMPORTANT FIX)
25
+ # =========================
26
+ COPY . .
27
 
28
+ # =========================
29
+ # PORT FOR HUGGING FACE
30
+ # =========================
 
 
 
31
  EXPOSE 7860
32
 
33
+ # =========================
34
+ # START APP
35
+ # =========================
36
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]