-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 825 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 825 Bytes
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
# Use Miniforge3 as base image - it comes with mamba pre-installed
FROM condaforge/miniforge3:latest
# Set bash as the default shell
ENV SHELL=/bin/bash
# Set working directory
WORKDIR /app
# Install make and other system dependencies
RUN apt-get update && \
apt-get install -y make && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy the entire project
COPY . .
# Install conda-lock and create the environment in a single layer
RUN mamba init bash && \
. /root/.bashrc && \
mamba install -y -c conda-forge conda-lock && \
conda-lock install --mamba -n geoapps-env conda-lock-dev.yml && \
mamba clean -afy && \
echo "mamba activate geoapps-env" >> ~/.bashrc
# Install the package in editable mode
RUN mamba run -n geoapps-env pip install -e .
# Just start bash
CMD ["/bin/bash"]