forked from dsvanidze/replicability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (24 loc) · 1020 Bytes
/
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
# Load miniconda image
FROM continuumio/miniconda3:4.9.2
# Set working directory to /all
WORKDIR /all
# Copy set.py into Docker environment
COPY setup.py ./
# Copy src directory into Docker environment
COPY src/ ./src/
# Copy conda enrionment file into Docker environment
COPY environment.yml ./
# Set default command line to "bash"
SHELL ["/bin/bash", "-c"]
ENV BASH_ENV ~/.bashrc
# Install mamba package manager (almost same as conda)
# for resolving package dependencies faster than conda (https://github.com/mamba-org/mamba)
RUN conda install mamba -n base -c conda-forge
# Create a mamba environment and install all listed packages from environment.yml file
RUN mamba env create -f environment.yml
# Initialise conda environment (created by mamba) in bash
RUN conda init bash
RUN source "../root/.bashrc"
# Save activation of the conda environment for the project in the bash config file
# In order to activate the enironment everytime bash starts within Docker
RUN echo "conda activate replicability" >> ~/.bashrc