3hstack commited on
Commit
55251ef
·
verified ·
1 Parent(s): 1f7637b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -6
Dockerfile CHANGED
@@ -1,19 +1,22 @@
1
  FROM python:3.11-slim
2
 
3
- # geopandas/pyproj/rtree ship manylinux wheels, but osmnx still wants a C toolchain
4
- # available for a couple of transitive builds on slim.
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  build-essential \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
  WORKDIR /app
10
 
11
- COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
13
 
14
  COPY app.py .
15
 
16
- # HF Spaces run as a non-root user; only /tmp is writable.
17
  ENV HOME=/tmp \
18
  MPLCONFIGDIR=/tmp/mpl \
19
  XDG_CACHE_HOME=/tmp/cache \
@@ -22,4 +25,4 @@ ENV HOME=/tmp \
22
 
23
  EXPOSE 7860
24
 
25
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "--timeout", "300", "app:app"]
 
1
  FROM python:3.11-slim
2
 
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
  build-essential \
5
  && rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /app
8
 
9
+ RUN pip install --no-cache-dir \
10
+ flask==3.0.3 \
11
+ gunicorn==22.0.0 \
12
+ requests==2.32.3 \
13
+ osmnx==2.0.7 \
14
+ networkx==3.4.2 \
15
+ shapely==2.0.6 \
16
+ geopandas==1.0.1
17
 
18
  COPY app.py .
19
 
 
20
  ENV HOME=/tmp \
21
  MPLCONFIGDIR=/tmp/mpl \
22
  XDG_CACHE_HOME=/tmp/cache \
 
25
 
26
  EXPOSE 7860
27
 
28
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "4", "--timeout", "300", "app:app"]