generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
41 lines (34 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Fix mambaorg/micromamba tag (lastest was not updated on the ci computer)
FROM mambaorg/micromamba:bookworm-slim
# all the apt-get installs
USER root
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 environment.yml environment.yml
# install the python packages via anaconda
RUN micromamba create --file /tmp/environment.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"
# /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/"]