This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from gammasim/gammasim-tools-production
Production container
- Loading branch information
Showing
8 changed files
with
117 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ verification-process | |
output | ||
simulation-model-description | ||
data-from-instrument-teams | ||
*.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From ubuntu:latest | ||
WORKDIR workdir | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
bash \ | ||
build-essential \ | ||
bzip2 \ | ||
csh \ | ||
gfortran \ | ||
gcc \ | ||
g++ \ | ||
git \ | ||
libgsl-dev \ | ||
krb5-user \ | ||
libpam-krb5 \ | ||
make \ | ||
unzip \ | ||
vim \ | ||
wget && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# corsika and sim_telarray | ||
RUN mkdir sim_telarray | ||
COPY corsika7.7_simtelarray.tar.gz sim_telarray | ||
RUN cd sim_telarray && \ | ||
tar -xvzf corsika7.7_simtelarray.tar.gz && \ | ||
./build_all prod5 qgs2 gsl && \ | ||
find . -name "*.tar.gz" -exec rm -f {} \; && \ | ||
cd .. | ||
ENV SIMTELPATH="/workdir/sim_telarray/" | ||
|
||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p ${WORKDIR}/conda && \ | ||
rm ~/miniconda.sh && \ | ||
${WORKDIR}/conda/bin/conda clean -tipsy && \ | ||
${WORKDIR}/conda/bin/conda install -c conda-forge mamba | ||
ENV PATH /${WORKDIR}/conda/bin:$PATH | ||
|
||
RUN wget --quiet https://github.com/gammasim/gammasim-tools/archive/refs/heads/master.zip && \ | ||
unzip master.zip && mv gammasim-tools-master gammasim-tools && \ | ||
rm -f master.zip && cd gammasim-tools && \ | ||
mv environment.yml environment.yml.tmp && \ | ||
grep -v "name: gammasim-tools-dev" environment.yml.tmp > environment.yml && \ | ||
mamba env update -n base --file environment.yml && \ | ||
conda clean -tipsy | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN source /root/.bashrc && \ | ||
conda init bash | ||
ENV PYTHONPATH=$PYTHONPATH:"/workdir/external/gammasim-tools" | ||
|
||
COPY config.yml /workdir/gammasim-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Docker container for gammasim-tools production | ||
|
||
**this is work in progress and not working yet** | ||
|
||
## Introduction | ||
|
||
Provide a container for using gammasim-tools. | ||
|
||
Container contains installation of: | ||
|
||
- corsika and sim\_telarray | ||
- miniconda | ||
- packages required by gammasim-tools (from environment.yml) | ||
- gammasim-tools (master) | ||
|
||
## Building | ||
|
||
Building expects that a tar ball of corsika/sim\_telarray (corsika7.7\_simtelarray.tar.gz) is available in the building directory. | ||
Download the tar package from the MPIK website (password applies) with | ||
|
||
``` | ||
$ ../tools/download_simulationsoftware.sh | ||
``` | ||
|
||
Build the container with: | ||
|
||
``` | ||
$ docker build -t gammasim-tools-prod . | ||
``` | ||
|
||
Building will take a while and the image is large (3.9 GB; mostly due to the >2 GB conda stuff). | ||
|
||
## Running | ||
|
||
To run the container in bash | ||
|
||
``` | ||
$ docker run --rm -it -v "$(pwd)/external:/workdir/external" gammasim-tools-prod bash | ||
``` | ||
|
||
In the container, find the gammasim-tools directory: | ||
``` | ||
$ cd ./gammasim-tools/ | ||
``` | ||
|
||
Expect any external software (e.g., gammasim-tools) in ./external directory (see [README.md](external/README.md)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
--- | ||
# configuration file for simtools | ||
|
||
useMongoDB: true | ||
useMongoDB: True | ||
mongoDBConfigFile: ./dbDetails.yml | ||
|
||
modelFilesLocations: [ | ||
/workdir/external/simulation-model-description/configReports/, | ||
/workdir/external/simulation-model-description/datFiles/, | ||
/workdir/external/data-from-instrument-teams/, | ||
/workdir/external/gammasim-tools/data/test-data/ | ||
/workdir/external/verification-process/dataFromInstrumentTeams/ | ||
] | ||
|
||
outputLocation: /workdir/external/output/ | ||
|
||
dataLocation: '/workdir/external/gammasim-tools/data/' | ||
dataLocation: './data/' | ||
|
||
simtelPath: /workdir/sim_telarray/ | ||
simtelPath: '$SIMTELPATH' | ||
|
||
# Not used yet | ||
submissionCommand: 'qsub ' | ||
|
||
extraCommands: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters