-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
84 lines (73 loc) · 4.37 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Galaxy - ASaiM
FROM quay.io/bgruening/galaxy:20.09
MAINTAINER Bérénice Batut, berenice.batut@gmail.com
# Enable Conda dependency resolution
ENV GALAXY_CONFIG_BRAND="ASaiM" \
GALAXY_CONFIG_CONDA_AUTO_INSTALL=True
RUN apt update && apt install -y netcat-openbsd
# Change the tool_conf to get different tool sections and labels
COPY config/tool_conf.xml $GALAXY_ROOT/config/
# Install tools
# Split into multiple layers to minimize disk space usage while building
# Rules to follow:
# - Keep in the same yaml file the tools that share common conda dependencies (conda is only able to use hardlinks within a Docker layer)
# - Docker will use 2*(size of the layer) on the disk while building, so 1 yaml should not install more data than half of the remaining space on the disk
# => 'big' tools should go in the first yaml file, the last yaml file should contain smaller tools
# - When one of the layer can't be built with a "no space left" error message, you'll probably need to split a yaml in 2 (supposing you followed the previous rules)
COPY config/asaim_tools_1.yaml $GALAXY_ROOT/asaim_tools_1.yaml
COPY config/asaim_tools_2.yaml $GALAXY_ROOT/asaim_tools_2.yaml
COPY config/asaim_tools_3.yaml $GALAXY_ROOT/asaim_tools_3.yaml
COPY config/asaim_tools_4.yaml $GALAXY_ROOT/asaim_tools_4.yaml
COPY config/asaim-mt_tools.yaml $GALAXY_ROOT/asaim-mt_tools.yaml
COPY config/data_library.yaml $GALAXY_ROOT/data_library.yaml
RUN df -h && \
install-tools $GALAXY_ROOT/asaim_tools_1.yaml && \
/tool_deps/_conda/bin/conda clean --tarballs --yes && \
rm -rf /tool_deps/_conda/pkgs && \
df -h
RUN df -h && \
install-tools $GALAXY_ROOT/asaim_tools_2.yaml && \
/tool_deps/_conda/bin/conda clean --tarballs --yes && \
rm -rf /tool_deps/_conda/pkgs && \
df -h
RUN df -h && \
install-tools $GALAXY_ROOT/asaim_tools_3.yaml && \
/tool_deps/_conda/bin/conda clean --tarballs --yes && \
rm -rf /tool_deps/_conda/pkgs && \
df -h
RUN df -h && \
install-tools $GALAXY_ROOT/asaim_tools_4.yaml && \
/tool_deps/_conda/bin/conda clean --tarballs --yes && \
rm -rf /tool_deps/_conda/pkgs && \
df -h
RUN df -h && \
install-tools $GALAXY_ROOT/asaim-mt_tools.yaml && \
/tool_deps/_conda/bin/conda clean --tarballs --yes && \
rm -rf /tool_deps/_conda/pkgs && \
df -h && \
mkdir -p $GALAXY_ROOT/workflows
# Import workflows (local and from training) and data manager description, install the data libraries and the workflows
COPY config/workflows/* $GALAXY_ROOT/workflows/
ADD https://raw.githubusercontent.com/galaxyproject/training-material/master/topics/metagenomics/tutorials/general-tutorial/workflows/wgs-worklow.ga $GALAXY_ROOT/workflows/
ADD https://raw.githubusercontent.com/galaxyproject/training-material/master/topics/metagenomics/tutorials/general-tutorial/workflows/wgs-worklow.ga $GALAXY_ROOT/workflows/
ADD https://raw.githubusercontent.com/galaxyproject/training-material/master/topics/metagenomics/tutorials/mothur-miseq-sop/workflows/mothur-miseq-sop.ga $GALAXY_ROOT/workflows/
COPY config/data_managers.yaml $GALAXY_ROOT/data_managers.yaml
COPY create_admin_user.sh $GALAXY_ROOT/create_admin_user.sh
ENV GALAXY_CONFIG_TOOL_PATH=/galaxy-central/tools/
ENV PATH="${PATH}:/tool_deps/_conda/bin"
RUN startup_lite && \
galaxy-wait && \
$GALAXY_ROOT/create_admin_user.sh && \
workflow-install --publish --workflow_path $GALAXY_ROOT/workflows/ -g http://localhost:8080 -u $GALAXY_DEFAULT_ADMIN_EMAIL -p $GALAXY_DEFAULT_ADMIN_PASSWORD
#RUN startup_lite && \
# galaxy-wait && \
# setup-data-libraries -i $GALAXY_ROOT/data_library.yaml -g http://localhost:8080 -u $GALAXY_DEFAULT_ADMIN_USER -p $GALAXY_DEFAULT_ADMIN_PASSWORD
# Copy the script to launch the data managers
COPY bin/run_data_managers run_data_managers
# Install the tours
ADD https://raw.githubusercontent.com/galaxyproject/training-material/master/topics/metagenomics/tutorials/general-tutorial/tours/metagenomics-general-tutorial-amplicon.yml $GALAXY_ROOT/config/plugins/tours/
ADD https://raw.githubusercontent.com/galaxyproject/training-material/master/topics/metagenomics/tutorials/general-tutorial/tours/metagenomics-general-tutorial-shotgun.yml $GALAXY_ROOT/config/plugins/tours/
# Add Container Style
ENV GALAXY_CONFIG_WELCOME_URL=$GALAXY_CONFIG_DIR/web/welcome.html
COPY config/welcome.html $GALAXY_CONFIG_DIR/web/welcome.html
COPY config/asaim_logo.svg $GALAXY_CONFIG_DIR/web/welcome_asaim_logo.svg