-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgenerate_images.sh
39 lines (32 loc) · 1.17 KB
/
generate_images.sh
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
#Generate Dockerfile.
#!/bin/sh
set -e
generate_docker() {
docker run --rm kaczmarj/neurodocker:0.7.0 generate docker \
--base neurodebian:stretch-non-free \
--pkg-manager apt \
--arg DEBIAN_FRONTEND=noninteractive \
--install fsl \
--miniconda \
version=latest \
conda_install="python=3.8" \
pip_install="dipy" \
create_env='bids_bep16_conv' \
activate=true \
--run-bash "source activate bids_bep16_conv && conda install -c mrtrix3 mrtrix3" \
--copy . /home/bids_bep16_conv \
--run-bash "source activate bids_bep16_conv && cd /home/bids_bep16_conv && pip install -e ." \
--env IS_DOCKER=1 \
--workdir '/tmp/' \
--entrypoint "/neurodocker/startup.sh bids_bep16_conv"
}
# generate files
generate_docker > Dockerfile
# check if images should be build locally or not
if [ $1 = local ]; then
echo "docker image will be build locally"
# build image using the saved files
docker build -t bids_bep16_conv:local .
else
echo "Image(s) won't be build locally."
fi