Skip to content

Commit f3318b2

Browse files
committed
deps-ci: sets up docker with added geopands deps in order to prep for heatmap endpoint
1 parent 788e25b commit f3318b2

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

Diff for: Dockerfile

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
FROM python:alpine as base
1+
# Use Miniconda-based image
2+
FROM continuumio/miniconda3
3+
24

35
ENV PATH="/opt/venv/bin:$PATH"
46

57
WORKDIR .
68

7-
COPY requirements.txt .
9+
COPY requirements.txt .
10+
# Create and activate a Conda environment, installing dependencies from Conda Forge
11+
RUN conda create -n geo_env -c conda-forge python=3.11 geopandas pyogrio shapely \
12+
&& conda install -n geo_env -c conda-forge --file requirements.txt
813

14+
# Activate the environment for all shell commands
15+
SHELL ["conda", "run", "-n", "geo_env", "/bin/bash", "-c"]
916

10-
RUN pip3 install -r requirements.txt
17+
# Set entrypoint to ensure Conda environment is used
18+
ENTRYPOINT ["conda", "run", "-n", "geo_env"]
1119

1220
RUN mkdir code
1321
RUN cd code

Diff for: docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ services:
66
volumes:
77
- ./:/code/
88
working_dir: /code
9-
command: [ "python", "run.py", "0.0.0.0:5500" ]
9+
command: [ "conda", "run", "-n", "geo_env", "python", "run.py", "0.0.0.0:5500" ]
1010
ports:
1111
- "5500:5500"

Diff for: heat-map/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
folium
2-
pandas
3-
geopandas
1+
folium==0.19.5
2+
pandas==2.2.3
3+
geopandas==1.0.1

Diff for: requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ MarkupSafe==3.0.2
1010
requests==2.32.3
1111
urllib3==2.3.0
1212
Werkzeug==3.1.3
13+
folium==0.19.5
14+
pandas==2.2.3
1315
pytest==8.3.4
1416
ruff==0.9.7

0 commit comments

Comments
 (0)