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

working osa docker, no curlftpfs

parent 69781634
IMAGE?=integralsw/osa:11.0
IMAGE_LATEST?=integralsw/osa:latest
#IMAGE?=cdcihn.isdc.unige.ch:443/integral-osa:11.0
push: build
docker push $(IMAGE)
......@@ -10,3 +9,6 @@ build: Dockerfile
docker build . -t $(IMAGE)
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/
source $HEADAS/headas-init.sh
......@@ -11,3 +13,4 @@ source $ISDC_ENV/bin/isdc_init_env.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=$@
echo "REP_BASE_PROD: ${REP_BASE_PROD:?}"
echo "CURRENT_IC: ${CURRENT_IC:?}"
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 /tmp/osa-home-$$
mkdir -pv /tmp/osa-home-$$-pfiles
mkdir -pv $WORKDIR
mkdir -pv $WORKDIR/pfiles
docker run \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /tmp/osa-home-$$-pfiles:/pfiles \
-v /tmp/osa-home-$$:/home/integral \
-v $REP_BASE_PROD:/data/rep_base_prod \
-v $CURRENT_IC:/data/current_ic \
-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 "export HOME=/home/integral; source init.sh; $COMMAND"
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