AItool commited on
Commit
fa6a0d9
·
verified ·
1 Parent(s): 93ef80a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -4
Dockerfile CHANGED
@@ -1,7 +1,20 @@
1
  FROM python:3.11-slim
 
 
2
  WORKDIR /app
 
 
 
 
 
 
 
 
3
  COPY requirements.txt .
4
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
5
- && pip install --no-cache-dir -r requirements.txt
6
- COPY . .
7
- CMD ["uvicorn","main:app","--host","0.0.0.0","--port","7860"]
 
 
 
 
1
  FROM python:3.11-slim
2
+
3
+ # 1) set up workdir + system deps (if any)
4
  WORKDIR /app
5
+
6
+ # 2) copy your library subtree
7
+ COPY python-fasthtml ./python-fasthtml
8
+
9
+ # 3) install your library first
10
+ RUN pip install --no-cache-dir ./python-fasthtml
11
+
12
+ # 4) copy rest of project
13
  COPY requirements.txt .
14
+ COPY main.py .
15
+
16
+ # 5) install all other deps
17
+ # (remove python-fasthtml from requirements.txt)
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]