Commit 46c1157d authored by Volodymyr SAVCHENKO's avatar Volodymyr SAVCHENKO

working osa docker, no curlftpfs

parent 69781634
IMAGE?=integralsw/osa:11.0 IMAGE?=integralsw/osa:11.0
IMAGE_LATEST?=integralsw/osa:latest IMAGE_LATEST?=integralsw/osa:latest
#IMAGE?=cdcihn.isdc.unige.ch:443/integral-osa:11.0
push: build push: build
docker push $(IMAGE) docker push $(IMAGE)
...@@ -10,3 +9,6 @@ build: Dockerfile ...@@ -10,3 +9,6 @@ build: Dockerfile
docker build . -t $(IMAGE) docker build . -t $(IMAGE)
docker build . -t $(IMAGE_LATEST) docker build . -t $(IMAGE_LATEST)
pull:
docker pull $(IMAGE)
docker pull $(IMAGE_LATEST)
export HOME=/home/integral
export HEADAS=/opt/heasoft/x86_64-unknown-linux-gnu-libc2.17/ export HEADAS=/opt/heasoft/x86_64-unknown-linux-gnu-libc2.17/
source $HEADAS/headas-init.sh source $HEADAS/headas-init.sh
...@@ -11,3 +13,4 @@ source $ISDC_ENV/bin/isdc_init_env.sh ...@@ -11,3 +13,4 @@ source $ISDC_ENV/bin/isdc_init_env.sh
source /opt/root/bin/thisroot.sh source /opt/root/bin/thisroot.sh
#!/bin/bash
set -xe
COMMAND=$@
echo "REP_BASE_PROD: ${REP_BASE_PROD:?please set this variable to the current data location}"
echo "CURRENT_IC: ${CURRENT_IC:?please set this variable to the current IC location}"
echo "using WORKDIR: ${WORKDIR:=$PWD}"
mkdir -pv $WORKDIR
mkdir -pv $WORKDIR/pfiles
docker run \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $WORKDIR:/home/integral \
-v $REP_BASE_PROD/scw:/data/scw:ro \
-v $REP_BASE_PROD/aux:/data/aux:ro \
-v $CURRENT_IC/ic:/data/ic:ro \
-v $CURRENT_IC/idx:/data/idx:ro \
--rm -it --user $(id -u) \
integralsw/osa:11.0 bash -c "
cat init.sh
. init.sh
cd \$HOME
echo -e '\\e[31mrunning\\e[37m $COMMAND\\e[0m'
$COMMAND
"
set -xe
COMMAND=$@ COMMAND=$@
echo "REP_BASE_PROD: ${REP_BASE_PROD:?}" echo "REP_BASE_PROD: ${REP_BASE_PROD:?please set this variable to the current data location}"
echo "CURRENT_IC: ${CURRENT_IC:?}" echo "CURRENT_IC: ${CURRENT_IC:?please set this variable to the current IC location}"
echo "using WORKDIR: ${WORKDIR:=$PWD}"
mkdir -pv /tmp/osa-home-$$ mkdir -pv $WORKDIR
mkdir -pv /tmp/osa-home-$$-pfiles mkdir -pv $WORKDIR/pfiles
docker run \ docker run \
-e DISPLAY=$DISPLAY \ -e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \ -v /tmp/.X11-unix:/tmp/.X11-unix \
-v /tmp/osa-home-$$-pfiles:/pfiles \ -v $WORKDIR:/home/integral \
-v /tmp/osa-home-$$:/home/integral \ -v $REP_BASE_PROD/scw:/data/scw:ro \
-v $REP_BASE_PROD:/data/rep_base_prod \ -v $REP_BASE_PROD/aux:/data/aux:ro \
-v $CURRENT_IC:/data/current_ic \ -v $CURRENT_IC/ic:/data/ic:ro \
--rm -it --user $(id -u) \ -v $CURRENT_IC/idx:/data/idx:ro \
integralsw/osa:11.0 bash -c "export HOME=/home/integral; source init.sh; $COMMAND" --rm -it --user $(id -u) \
integralsw/osa:11.0 bash -c "
cat init.sh
. init.sh
cd \$HOME
echo -e '\\e[31mrunning\\e[37m $COMMAND\\e[0m'
$COMMAND
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment