Skip to content

Commit

Permalink
TMP: get docker psql version
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed Apr 9, 2024
1 parent c3ff399 commit 1a019b9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ jobs:
sed -i '/pwd:/c\pwd: ${{ secrets.PASSWORD_BD_UNI }}' configs/bd_uni_connection_params/credentials.yaml
- name: build docker image
run: docker build --build-arg http_proxy=http://proxy.ign.fr:3128/ --build-arg https_proxy=http://proxy.ign.fr:3128/ -t lidar_prod .
run: docker build --build-arg http_proxy=http://proxy.ign.fr:3128/ --build-arg https_proxy=http://proxy.ign.fr:3128/ -t lidar_prod . --no-cache

- name: get postgresql version
run: docker run lidar_prod psql --version

- name: get pgsql2shp version
run: docker run lidar_prod apt list -a postgis

- name: Check code neatness (linter)
run: docker run lidar_prod flake8
Expand All @@ -39,7 +45,7 @@ jobs:
docker run --network host
lidar_prod
python -m
pytest -rA -v -m "not slow" --ignore=actions-runner
pytest -rA -vv -m "not slow" --ignore=actions-runner
- name: Run slow tests last (evaluation on large file)
run: >
Expand Down
60 changes: 30 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@ FROM mambaorg/micromamba:latest
# all the apt-get installs
USER root

RUN apt-get update && apt-get upgrade -y && apt-get install -y \
software-properties-common \
postgis
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y postgis>=3.3.0

# Only copy necessary files to set up the environment, in order
# to use docker caching if requirements files were not updated.
# Dir needs to be "/tmp" for micromamba to find the pip requirements...
WORKDIR /tmp
COPY ./setup_env/ .
# # Only copy necessary files to set up the environment, in order
# # to use docker caching if requirements files were not updated.
# # Dir needs to be "/tmp" for micromamba to find the pip requirements...
# WORKDIR /tmp
# COPY ./setup_env/ .

# install the python packages via anaconda
RUN micromamba create --file /tmp/requirements.yml
# # install the python packages via anaconda
# RUN micromamba create --file /tmp/requirements.yml

# Sets the environment name (since it is not named "base")
# This ensures that env is activated when using "docker run ..."
ENV ENV_NAME lidar_prod
# Make RUN commands here use the environment
ARG MAMBA_DOCKERFILE_ACTIVATE=1
# List packages and their version
RUN micromamba list
# test if pdal is installed (a tricky library!)
RUN echo "Make sure pdal is installed:"
RUN python -c "import pdal"
# # Sets the environment name (since it is not named "base")
# # This ensures that env is activated when using "docker run ..."
# ENV ENV_NAME lidar_prod
# # Make RUN commands here use the environment
# ARG MAMBA_DOCKERFILE_ACTIVATE=1
# # List packages and their version
# RUN micromamba list
# # test if pdal is installed (a tricky library!)
# RUN echo "Make sure pdal is installed:"
# RUN python -c "import pdal"

# /lidar becomes the working directory, where the repo content
# (the context of this Dockerfile) is copied.
WORKDIR /lidar
COPY . .
# # /lidar becomes the working directory, where the repo content
# # (the context of this Dockerfile) is copied.
# WORKDIR /lidar
# COPY . .

# Example command to run the application from within the image
CMD ["python", \
"lidar_prod/run.py", \
"print_config=true", \
"paths.src_las=your_las.las", \
"paths.output_dir=./path/to/outputs/"]
# # Example command to run the application from within the image
# CMD ["python", \
# "lidar_prod/run.py", \
# "print_config=true", \
# "paths.src_las=your_las.las", \
# "paths.output_dir=./path/to/outputs/"]

0 comments on commit 1a019b9

Please sign in to comment.