-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
46 lines (33 loc) · 1.09 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
42
43
44
45
46
FROM condaforge/mambaforge:latest
# Setup
WORKDIR /home/sunbeam
ARG SUNBEAM_VER
RUN mkdir -p etc/
COPY etc/* etc/
RUN mkdir -p extensions/
COPY extensions/.placeholder extensions/
RUN mkdir -p src/sunbeamlib/
COPY src/sunbeamlib/* src/sunbeamlib/
COPY tests/ tests/
COPY workflow/ workflow/
COPY environment.yml install.sh MANIFEST.in pyproject.toml pytest.ini README.md ./
# Install sunbeam
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git vim
RUN ./install.sh -e sunbeam -v
ENV PATH="/opt/conda/envs/sunbeam/bin/:${PATH}"
ENV SUNBEAM_DIR="/home/sunbeam"
ENV SUNBEAM_VER ${SUNBEAM_VER}
ENV SUNBEAM_MIN_MEM_MB="8000"
ENV SUNBEAM_MIN_RUNTIME="60"
# Install conda environments
RUN mkdir -p projects
RUN sunbeam init --data_fp tests/data/reads projects/init
RUN sunbeam run --profile projects/init --conda-create-envs-only --mamba
RUN rm -r projects
# "Activate" the environment
SHELL ["conda", "run", "-n", "sunbeam", "/bin/bash", "-c"]
RUN echo "Python: $(python --version), Snakemake: $(snakemake --version), Conda: $(conda --version)" > installed_packages.txt
# Run
CMD "bash"