Commit f1f9eed0 authored by Gonzalo Bayo's avatar Gonzalo Bayo

Added run.sh script

parent e276f9df
Pipeline #4018 failed with stage
in 36 minutes and 4 seconds
......@@ -4,8 +4,6 @@
```bash
git clone -b csb1_install git@gitlab.gmrv.es:common/gmrvvissp.git
cp PATH_TO_APICOLAT_IMAGE/apicolat.tar gmrvvisp/gmrvvissp
cmake .. -DCLONE_SUBPROJECTS=ON -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo cpack -C Release -G DEB
cd gmrvvissp
./run.sh
```
#!/bin/bash
containername="apicolat"
result=$(docker ps -q --filter "name=apicolat")
if [ -z "$result" ]; then
echo Running Docker container
if [ -z $(docker volume ls -q --filter "name=mongo_volume") ]; then
echo "Creating mongo_volume..."
docker volume create --name mongo_volume
mongodir=$(pwd)/mongodb
fi
if [ -z $(docker volume ls -q --filter "name=data_volume") ]; then
echo "Creating data_volume..."
docker volume create --name data_volume
datadir=$(pwd)/data
fi
if [ -z $(docker images -q apicolat:latest) ]; then
echo "Loading apicolat image..."
docker load < /opt/gmrvvissp/apicolat.tar
fi
if [ -z $(docker ps -q --filter "name=apicolat") ]; then
echo "Running Docker container"
docker run --rm --name="$containername" -e NODE_PATH="/app/apicolat/web/dcexplorer/node_modules" -v $datadir:/app/data -v $mongodir:/var/lib/mongodb -p 8888:8888 -p 19000:19000 -p 19001:19001 -i $containername:latest
fi
echo Opening DCExplorer
echo "Opening DCExplorer"
/usr/bin/weco -z hbp:// -u http://localhost:8888 -sp 12345 &
echo Opening Pyramidal
echo "Opening Pyramidal"
/usr/bin/build/bin/CellExplorer -z hbp:// &
echo Opening Clint
echo "Opening Clint"
/usr/bin/ClintExplorer -z hbp:// -sp 31400 -cu http://localhost -cp 3652 &
#!/bin/bash
if [ ! -f "./gmrvvissp/apicolat.tar" ]; then
echo "Downloading apicolat.tar from etna.escet.urjc.es..."
scp -r $USER@etna.escet.urjc.es:~/repositorio/software/LibreriasWindows/apicolat.tar ./gmrvvissp
fi
if [ -d "./build" ]; then
echo "Removing previous build folder..."
rm -rf build
fi
echo "Creating new build folder..."
mkdir build && cd build
echo "CMake..."
cmake .. -DCLONE_SUBPROJECTS=ON -DCMAKE_BUILD_TYPE=Release
echo "Make..."
make -j$(nproc)
echo "CPack..."
sudo cpack -C Release -G DEB
cd ..
echo "Done!"
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