File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ # exclude venv
2
+ venv
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ COPY . /app/cars
32
32
33
33
# Install fiona and rasterio with gdal / proj from otb
34
34
WORKDIR /app/cars
35
- RUN echo "CARS installation" && CARS_VENV=$VIRTUAL_ENV make clean && CARS_VENV=$VIRTUAL_ENV make install-gdal-dev
35
+ RUN echo "CARS installation" && CARS_VENV=$VIRTUAL_ENV make clean && CARS_VENV=$VIRTUAL_ENV make install/dev -gdal
36
36
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
37
37
38
38
# hadolint ignore=DL3013,SC2102
Original file line number Diff line number Diff line change @@ -63,6 +63,15 @@ install/deps-gdal: install/deps ## create an healthy python environment for GDAL
63
63
@[ " ${CHECK_FIONA} " ] || ${CARS_VENV} /bin/python -m pip install --no-binary fiona fiona
64
64
@[ " ${CHECK_RASTERIO} " ] || ${CARS_VENV} /bin/python -m pip install --no-binary rasterio rasterio
65
65
66
+ .PHONY : install/dev-gdal
67
+ install/dev-gdal : install/deps-gdal # # install cars on healthy python env for gdal/proj
68
+ @test -f ${CARS_VENV} /bin/cars || source ${CARS_VENV} /bin/activate; pip install --no-build-isolation --editable .[dev,docs,notebook]
69
+ @test -f .git/hooks/pre-commit || echo " Install pre-commit hook"
70
+ @test -f .git/hooks/pre-commit || ${CARS_VENV} /bin/pre-commit install -t pre-commit
71
+ @test -f .git/hooks/pre-push || ${CARS_VENV} /bin/pre-commit install -t pre-push
72
+ @echo " CARS ${CARS_VERSION} installed in dev mode in virtualenv ${CARS_VENV} "
73
+ @echo " CARS venv usage: source ${CARS_VENV} /bin/activate; cars -h"
74
+
66
75
.PHONY : install/deps
67
76
install : install/deps # # install cars in dev editable mode (pip install --no-build-isolation -e .) without recompiling rasterio and fiona
68
77
@test -f ${CARS_VENV} /bin/cars || source ${CARS_VENV} /bin/activate; pip install --no-build-isolation --editable .[dev,docs,notebook]
You can’t perform that action at this time.
0 commit comments