Skip to content

Commit 2d3407d

Browse files
committed
docker changes
1 parent 9fcfe1f commit 2d3407d

File tree

4 files changed

+230
-87
lines changed

4 files changed

+230
-87
lines changed

app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,4 +696,4 @@ def get_degree_ratios(lane_graph, mode):
696696

697697
if __name__ == "__main__":
698698
# run
699-
app.run(debug=True, host="localhost", port=8989)
699+
app.run(debug=True, host='0.0.0.0', port=8989)

dockerfile

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# build stage
2+
FROM python:3.9-slim
3+
4+
# Set the working directory in the container
5+
WORKDIR /backend
6+
7+
# Install GDAL dependencies
8+
RUN apt-get update
9+
RUN apt-get install -y gdal-bin libgdal-dev g++
10+
11+
# Set environment variables for GDAL
12+
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
13+
ENV C_INCLUDE_PATH=/usr/include/gdal
14+
ENV GDAL_CONFIG=/usr/bin/gdal-config
15+
16+
# Copy the requirements.txt file into the container
17+
COPY requirements.txt ./
18+
19+
# Install Python dependencies
20+
RUN pip install --upgrade pip
21+
RUN pip install --upgrade pip setuptools
22+
RUN pip install --no-binary fiona -r requirements.txt
23+
24+
# Copy the rest of the application code into the container
25+
COPY . .
26+
27+
# Expose port (if needed)
28+
EXPOSE 8989
29+
30+
# Define the command to run the Flask application
31+
CMD ["python", "app.py"]

environment.yml

+186
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
name: gis
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- appnope=0.1.4=pyhd8ed1ab_0
7+
- asttokens=2.4.1=pyhd8ed1ab_0
8+
- attrs=23.2.0=pyh71513ae_0
9+
- blas=1.0=mkl
10+
- blosc=1.21.3=hcec6c5f_0
11+
- boost-cpp=1.70.0=hd59e818_1
12+
- bottleneck=1.3.7=py312h32608ca_0
13+
- brotli=1.0.9=hca72f7f_7
14+
- brotli-bin=1.0.9=hca72f7f_7
15+
- bzip2=1.0.8=h6c40b1e_5
16+
- c-ares=1.27.0=h10d778d_0
17+
- ca-certificates=2023.12.12=hecd8cb5_0
18+
- cairo=1.16.0=h691a603_2
19+
- certifi=2024.2.2=py312hecd8cb5_0
20+
- cfitsio=3.470=h01dc385_7
21+
- click=8.1.7=unix_pyh707e725_0
22+
- click-plugins=1.1.1=py_0
23+
- cligj=0.7.2=pyhd8ed1ab_1
24+
- comm=0.2.1=pyhd8ed1ab_0
25+
- contourpy=1.2.0=py312ha357a0b_0
26+
- curl=8.5.0=h04015c4_0
27+
- cycler=0.11.0=pyhd3eb1b0_0
28+
- debugpy=1.6.7=py312hcec6c5f_0
29+
- decorator=5.1.1=pyhd8ed1ab_0
30+
- exceptiongroup=1.2.0=pyhd8ed1ab_2
31+
- executing=2.0.1=pyhd8ed1ab_0
32+
- expat=2.5.0=hcec6c5f_0
33+
- fiona=1.9.5=py312he282a81_0
34+
- fontconfig=2.13.94=h10f422b_0
35+
- fonttools=4.25.0=pyhd3eb1b0_0
36+
- freetype=2.10.4=h4cff582_1
37+
- freexl=2.0.0=h3ec172f_0
38+
- gdal=3.6.2=py312hfe88152_4
39+
- geopandas=0.9.0=pyhd8ed1ab_0
40+
- geos=3.8.0=hb1e8313_0
41+
- geotiff=1.7.0=hf6ff7a4_3
42+
- gettext=0.21.1=h8a4c099_0
43+
- giflib=5.2.1=hb7f2c08_3
44+
- glib=2.78.4=hcec6c5f_0
45+
- glib-tools=2.78.4=hcec6c5f_0
46+
- hdf4=4.2.13=h39711bb_2
47+
- hdf5=1.12.1=ha01d115_3
48+
- icu=58.2=h0a44026_1000
49+
- importlib-metadata=7.0.1=pyha770c72_0
50+
- importlib_metadata=7.0.1=hd8ed1ab_0
51+
- intel-openmp=2023.1.0=ha357a0b_43548
52+
- ipykernel=6.29.3=pyh3cd1d5f_0
53+
- ipython=8.22.1=pyh707e725_0
54+
- jedi=0.19.1=pyhd8ed1ab_0
55+
- jpeg=9e=hb7f2c08_3
56+
- json-c=0.16=h01d06f9_0
57+
- jupyter_client=8.6.0=pyhd8ed1ab_0
58+
- jupyter_core=5.5.0=py312hecd8cb5_0
59+
- kealib=1.5.0=h72c422f_1
60+
- kiwisolver=1.4.4=py312hcec6c5f_0
61+
- krb5=1.20.1=h049b76e_0
62+
- lcms2=2.12=hf1fd2bf_0
63+
- lerc=3.0=he9d5cce_0
64+
- libbrotlicommon=1.0.9=hca72f7f_7
65+
- libbrotlidec=1.0.9=hca72f7f_7
66+
- libbrotlienc=1.0.9=hca72f7f_7
67+
- libcurl=8.5.0=hf20ceda_0
68+
- libcxx=14.0.6=h9765a3e_0
69+
- libdeflate=1.17=hb664fd8_1
70+
- libedit=3.1.20191231=h0678c8f_2
71+
- libev=4.33=h10d778d_2
72+
- libexpat=2.5.0=hf0c8a7f_1
73+
- libffi=3.4.4=hecd8cb5_0
74+
- libgdal=3.6.2=h8be97c6_4
75+
- libgfortran=5.0.0=13_2_0_h97931a8_3
76+
- libgfortran5=13.2.0=h2873a65_3
77+
- libglib=2.78.4=h19e1a8f_0
78+
- libiconv=1.17=hd75f5a5_2
79+
- libkml=1.3.0=hed7d534_1010
80+
- libnetcdf=4.8.1=h9f5a9a2_4
81+
- libnghttp2=1.57.0=h9beae6a_0
82+
- libopenblas=0.3.26=openmp_hfef2a42_0
83+
- libpng=1.6.39=h6c40b1e_0
84+
- libpq=12.17=h04015c4_0
85+
- libsodium=1.0.18=hbcb3906_1
86+
- libspatialindex=1.9.3=he49afe7_4
87+
- libspatialite=5.1.0=h0f56581_0
88+
- libssh2=1.10.0=h04015c4_2
89+
- libtiff=4.5.1=hcec6c5f_0
90+
- libwebp-base=1.3.2=h0dc2134_0
91+
- libxml2=2.10.4=h930c0e2_0
92+
- libzip=1.8.0=h29ab7a1_1
93+
- llvm-openmp=17.0.6=hb6ac08f_0
94+
- lz4-c=1.9.4=hf0c8a7f_0
95+
- matplotlib=3.8.0=py312hecd8cb5_0
96+
- matplotlib-base=3.8.0=py312h7f12edd_0
97+
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
98+
- minizip=4.0.3=h79ad51c_0
99+
- mkl=2023.1.0=h8e150cf_43560
100+
- mkl-service=2.4.0=py312h6c40b1e_1
101+
- mkl_fft=1.3.8=py312h6c40b1e_0
102+
- mkl_random=1.2.4=py312ha357a0b_0
103+
- munkres=1.1.4=py_0
104+
- ncurses=6.4=hcec6c5f_0
105+
- nest-asyncio=1.6.0=pyhd8ed1ab_0
106+
- networkx=3.1=py312hecd8cb5_0
107+
- numexpr=2.8.7=py312hac873b0_0
108+
- numpy=1.26.4=py312hac873b0_0
109+
- numpy-base=1.26.4=py312h6f81483_0
110+
- openblas=0.3.26=openmp_h6794695_0
111+
- openjpeg=2.4.0=h66ea3da_0
112+
- openssl=3.0.13=hca72f7f_0
113+
- packaging=23.2=pyhd8ed1ab_0
114+
- pandas=2.1.4=py312he282a81_0
115+
- parso=0.8.3=pyhd8ed1ab_0
116+
- pcre2=10.42=h9b97e30_0
117+
- pexpect=4.9.0=pyhd8ed1ab_0
118+
- pickleshare=0.7.5=py_1003
119+
- pillow=10.2.0=py312h6c40b1e_0
120+
- pip=23.3.1=py312hecd8cb5_0
121+
- pixman=0.40.0=h9ed2024_1
122+
- platformdirs=4.2.0=pyhd8ed1ab_0
123+
- poppler=0.81.0=h031bf0f_2
124+
- poppler-data=0.4.12=hd8ed1ab_0
125+
- proj=9.3.1=h1972728_0
126+
- prompt-toolkit=3.0.42=pyha770c72_0
127+
- psutil=5.9.0=py312h6c40b1e_0
128+
- ptyprocess=0.7.0=pyhd3deb0d_0
129+
- pure_eval=0.2.2=pyhd8ed1ab_0
130+
- pygments=2.17.2=pyhd8ed1ab_0
131+
- pyparsing=3.0.9=py312hecd8cb5_0
132+
- pyproj=3.6.1=py312hcd0417c_0
133+
- python=3.12.2=hd58486a_0
134+
- python-dateutil=2.8.2=pyhd8ed1ab_0
135+
- python-tzdata=2024.1=pyhd8ed1ab_0
136+
- pytz=2024.1=pyhd8ed1ab_0
137+
- pyzmq=25.1.2=py312hcec6c5f_0
138+
- qhull=2020.2=h940c156_2
139+
- readline=8.2=hca72f7f_0
140+
- rtree=1.0.1=py312hecd8cb5_0
141+
- scipy=1.11.4=py312h81688c2_0
142+
- setuptools=68.2.2=py312hecd8cb5_0
143+
- shapely=2.0.1=py312h9b3e53f_1
144+
- six=1.16.0=pyh6c4a22f_0
145+
- sqlite=3.41.2=h6c40b1e_0
146+
- stack_data=0.6.2=pyhd8ed1ab_0
147+
- tbb=2021.8.0=ha357a0b_0
148+
- tiledb=2.3.3=h1b93210_3
149+
- tk=8.6.12=h5d9f67b_0
150+
- tornado=6.3.3=py312h6c40b1e_0
151+
- traitlets=5.14.1=pyhd8ed1ab_0
152+
- typing_extensions=4.10.0=pyha770c72_0
153+
- tzdata=2024a=h04d1e81_0
154+
- wcwidth=0.2.13=pyhd8ed1ab_0
155+
- wheel=0.41.2=py312hecd8cb5_0
156+
- xerces-c=3.2.4=hd2b157f_0
157+
- xz=5.4.6=h6c40b1e_0
158+
- zeromq=4.3.5=hcec6c5f_0
159+
- zipp=3.17.0=pyhd8ed1ab_0
160+
- zlib=1.2.13=h4dc903c_0
161+
- zstd=1.5.5=hc035e20_0
162+
- pip:
163+
- affine==2.4.0
164+
- beautifulsoup4==4.12.3
165+
- blinker==1.7.0
166+
- distlib==0.3.8
167+
- filelock==3.13.1
168+
- flask==3.0.2
169+
- flask-failsafe==0.2
170+
- geoalchemy2==0.14.6
171+
- google==3.0.0
172+
- gpxpy==1.6.2
173+
- greenlet==3.0.3
174+
- itsdangerous==2.1.2
175+
- jinja2==3.1.3
176+
- markupsafe==2.1.5
177+
- opencv-python==4.9.0.80
178+
- pipenv==2023.12.1
179+
- psycopg2==2.9.9
180+
- rasterio==1.3.9
181+
- snuggs==1.4.7
182+
- soupsieve==2.5
183+
- sqlalchemy==2.0.28
184+
- virtualenv==20.25.1
185+
- werkzeug==3.0.1
186+
prefix: /Users/mischabauckhage/opt/anaconda3/envs/gis

requirements.txt

+12-86
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,13 @@
1-
appnope @ file:///home/conda/feedstock_root/build_artifacts/appnope_1707233003401/work
2-
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work
3-
attrs @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/attrs_1699282013651/work
4-
Bottleneck @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_19gnn4b1vz/croot/bottleneck_1709069916591/work
5-
branca @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/branca_1699252417951/work
6-
certifi @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_dfez5lkpj0/croot/certifi_1707229180975/work/certifi
7-
cffi==1.15.0
8-
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
9-
click @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/click_1699239792454/work
10-
click-plugins @ file:///Users/ktietz/demo/mc3/conda-bld/click-plugins_1630665883852/work
11-
cligj==0.7.2
12-
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1704278392174/work
13-
contourpy @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/contourpy_1707340536404/work
14-
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
15-
debugpy @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/debugpy_1699267934478/work
16-
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
17-
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1704921103267/work
18-
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1698579936712/work
19-
fiona @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_06jpheadmz/croot/fiona_1704920727678/work
20-
Flask @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_0ciz1g6mz5/croot/flask_1702980028646/work
21-
Flask-Cors @ file:///tmp/build/80754af9/flask-cors_1609957731919/work
22-
folium @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/folium_1699269946008/work
23-
fonttools==4.25.0
24-
GDAL @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_1em3xrx8kv/croot/gdal-split_1704913255342/work/build/swig/python
25-
GeoAlchemy2==0.14.6
26-
geopandas @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_6dufv51c9u/croot/geopandas-split_1704929005080/work
27-
greenlet==3.0.3
28-
idna @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/idna_1699239456905/work
29-
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1703269254275/work
30-
ipykernel @ file:///Users/runner/miniforge3/conda-bld/ipykernel_1708996616394/work
31-
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1709559745751/work
32-
itsdangerous @ file:///tmp/build/80754af9/itsdangerous_1621432558163/work
33-
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1696326070614/work
34-
Jinja2 @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/jinja2_1707339417889/work
35-
joblib @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/joblib_1699246281347/work
36-
jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1699283905679/work
37-
jupyter_core @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/jupyter_core_1701805380453/work
38-
kiwisolver @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/kiwisolver_1699242237265/work
39-
mapclassify @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/mapclassify_1699277369103/work
40-
MarkupSafe @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/markupsafe_1707339363573/work
41-
matplotlib @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/matplotlib-suite_1699246336365/work
42-
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1660814786464/work
43-
mip==1.14.2
44-
munkres==1.1.4
45-
nest_asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1705850609492/work
46-
networkx @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/networkx_1699249062431/work
47-
numexpr @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/numexpr_1699258484110/work
48-
numpy @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_b7iptlxgej/croot/numpy_and_numpy_base_1708638622773/work/dist/numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl#sha256=17c6374322464ccb505fe098301a221fc8d08783063c9c532ee2e0ac2b7f4983
49-
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1696202382185/work
50-
pandas @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_aa5q2dmbhr/croot/pandas_1709590498901/work/dist/pandas-2.2.1-cp312-cp312-macosx_10_9_x86_64.whl#sha256=cafb9cfbd27c4a6aa5182aa08e678bb70c2b50020b953bd17c422a5c24631397
51-
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work
52-
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1706113125309/work
53-
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
54-
pillow @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_f8zh99mhe_/croot/pillow_1707233029679/work
55-
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1706713388748/work
56-
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1702399386289/work
57-
psutil @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/psutil_1699246686105/work
1+
flask==3.0.2
2+
flask-failsafe==0.2
3+
geoalchemy2==0.14.6
4+
fiona==1.9.5
5+
geopandas==0.14.4
6+
opencv-python==4.9.0.80
587
psycopg2==2.9.9
59-
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
60-
pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work
61-
pycparser==2.21
62-
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1700607939962/work
63-
pyparsing @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/pyparsing_1699242788721/work
64-
pyproj @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_061ew8s4jv/croot/pyproj_1704904385178/work
65-
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1709299778482/work
66-
pytz @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/pytz_1699244189577/work
67-
pyzmq @ file:///private/var/folders/c_/qfmhj66j0tn016nkx_th4hxm0000gp/T/abs_c7mhasdker/croot/pyzmq_1705605099593/work
68-
requests @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_4fp_3tflo8/croot/requests_1707355574897/work
69-
Rtree @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/rtree_1699288775164/work
70-
scikit-learn @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/scikit-learn_1699250103019/work
71-
scipy @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/scipy_1699244292656/work/dist/scipy-1.11.3-cp312-cp312-macosx_10_9_x86_64.whl#sha256=c7988f1e25e9aadcd125c8296df6701b74a484c6b9487aa758f922d38802c399
72-
setuptools==69.1.1
73-
shapely @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/shapely_1699261776939/work
74-
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
75-
SQLAlchemy==2.0.28
76-
stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work
77-
threadpoolctl @ file:///Users/ktietz/demo/mc3/conda-bld/threadpoolctl_1629802263681/work
78-
tornado @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/tornado_1699250848162/work
79-
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1704212992681/work
80-
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1708904622550/work
81-
tzdata @ file:///croot/python-tzdata_1690578112552/work
82-
urllib3 @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/urllib3_1701808673422/work
83-
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1704731205417/work
84-
Werkzeug @ file:///private/var/folders/sy/f16zz6x50xz3113nwtb9bvq00000gp/T/abs_71eeseo_rw/croot/werkzeug_1706210087243/work
85-
wheel==0.42.0
86-
xyzservices @ file:///Users/builder/cbouss/perseverance-python-buildout/croot/xyzservices_1699251070342/work
87-
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1695255097490/work
8+
sqlalchemy==2.0.28
9+
networkx==3.1
10+
flask-cors==3.0.10
11+
scipy==1.11.4
12+
mip==1.14.2
13+
shapely==2.0.1

0 commit comments

Comments
 (0)