-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1.21 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
# Full contents of Dockerfile
FROM continuumio/miniconda3:24.7.1-0
LABEL name="quay.io/lifebitaiorg/cloudos-cli" \
description="The cloudos-cli docker container" \
maintainer="David Pineyro <[email protected]>"
# Use the base conda env to not be reliant on conda activate when using pip
ARG ENV_NAME="base"
# Install mamba for faster installation in the subsequent step
RUN conda install -c conda-forge mamba -y
# Install the conda environment
COPY environment.yml /
RUN mamba env update --quiet --name ${ENV_NAME} --file /environment.yml && conda clean -a
# Add conda installation dir to PATH (instead of doing 'conda activate')
ENV PATH /opt/conda/envs/${ENV_NAME}/bin:$PATH
# Dump the details of the installed packages to a file for posterity
RUN mamba env export --name ${ENV_NAME} > ${ENV_NAME}_exported.yml
# Copy local package files to be able to install
COPY . /
# Add the created folder to PATH so that tools are accessible
ENV PATH /cloudos:$PATH
# Install from local files, -e / points to where the setup.py file is located
RUN pip install -e /
# Make the python files executable from anyone (user, group, owner)
RUN chmod ugo+x /cloudos/*py
RUN chmod ugo+x /cloudos/jobs/*py
RUN chmod ugo+x /cloudos/utils/*py