Commit b118a61b authored by Michele Compostella's avatar Michele Compostella
Browse files

Removing choice for installation directory in the container

parent cc43bfcb
...@@ -53,14 +53,13 @@ If these optional parameters are not specified, the build process will ask for t ...@@ -53,14 +53,13 @@ If these optional parameters are not specified, the build process will ask for t
## How to run the Docker image ## How to run the Docker image
Once the Docker image has been created and the [Docker daemon is running](https://docs.docker.com/config/daemon/), you can shell into the container mounting a local folder where the output is stored using: Once the Docker image has been created and the [Docker daemon is running](https://docs.docker.com/config/daemon/), you can shell into the container mounting a local folder where the output files will be stored, using:
```shell ```shell
docker run -t -i --volume $HOME/favad_output/:/root/sample/output/ favad /bin/bash sudo docker run -t -i --volume $HOME/favad_output/:/root/sample/output/ favad /bin/bash
``` ```
Using the previous command, the ouput files generated inside the Docker container will be stored in $HOME/faved_output/. Using the previous command, the ouput files generated inside the Docker container will be available in $HOME/faved_output/ of your local machine. Please note that the content of this folder will be overwritten, if the folder is not empty.
Please note that the content of this folder will be overwritten, if the folder is not empty.
At this point you can run the workflow for fingerprinting and visualizing defects on the sample dataset inside the Docker container: At this point you can run the workflow for fingerprinting and visualizing defects on the sample dataset inside the Docker container:
```shell ```shell
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
## This software provides a workflow for fingerprinting and visualizing defects in damaged crystal ## This software provides a workflow for fingerprinting and visualizing defects in damaged crystal
## structures. The theoretical background is presented in: paper_ID ## structures. The theoretical background is presented in: paper_ID
## ##
## Run as root with: ## Run with:
## ./build.sh /installation_path/ "I agree" full_name email_address organization ## ./build.sh "I agree" full_name email_address organization
## ##
## For example: ## For example:
## ./build.sh /home/aurelius/software/ "I agree" "Marcus Aurelius" marcus.aurelius@email.com "Imperium Romanum" ## ./build.sh "I agree" "Marcus Aurelius" marcus.aurelius@email.com "Imperium Romanum"
## ##
############################################################################################################### ###############################################################################################################
...@@ -39,22 +39,13 @@ ...@@ -39,22 +39,13 @@
set -e set -e
set -o pipefail set -o pipefail
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
trap 'echo "\"${last_command}\" command filed with exit code $?."' EXIT trap 'echo "\"${last_command}\" command failed with exit code $?."; echo; echo "Build process interrupted!"; echo' EXIT
# Reading input parameters # Reading input parameters
PREFIX=$1 GAP=$1
GAP=$2 NAME=$2
NAME=$3 EMAIL=$3
EMAIL=$4 ORGANIZATION=$4
ORGANIZATION=$5
# Requiring at least the PREFIX parameter
if [ "$#" -lt 1 ]; then
echo
echo "Please provide the installation directory for the software in the Docker container"
echo "E.g: ./build.sh /root/software/"
exit
fi
# GAP license # GAP license
if [ ! -f ./software/GAP.tar.gz ] && [ "$GAP" != "I accept" ]; then if [ ! -f ./software/GAP.tar.gz ] && [ "$GAP" != "I accept" ]; then
...@@ -68,6 +59,7 @@ if [ ! -f ./software/GAP.tar.gz ] && [ "$GAP" != "I accept" ]; then ...@@ -68,6 +59,7 @@ if [ ! -f ./software/GAP.tar.gz ] && [ "$GAP" != "I accept" ]; then
read GAP read GAP
if [ "$GAP" != "I accept" ]; then if [ "$GAP" != "I accept" ]; then
echo "You did not accept the GAP license. Leaving installation process.." echo "You did not accept the GAP license. Leaving installation process.."
trap - EXIT
exit exit
fi fi
echo "Enter your name for the GAP license" echo "Enter your name for the GAP license"
...@@ -87,6 +79,7 @@ fi ...@@ -87,6 +79,7 @@ fi
if [ ! -f ./software/kdtree2.tar.gz ]; then if [ ! -f ./software/kdtree2.tar.gz ]; then
echo echo
echo "kdtree2.tar.gz archive is missing from the ./software/ folder. Leaving installation.." echo "kdtree2.tar.gz archive is missing from the ./software/ folder. Leaving installation.."
trap - EXIT
exit exit
fi fi
...@@ -120,13 +113,13 @@ echo ...@@ -120,13 +113,13 @@ echo
echo "Build complete!" echo "Build complete!"
echo echo
echo "You can run the image interactively mounting an ouput folder (use the full path) with:" echo "You can run the image interactively mounting an ouput folder (use the full path) with:"
echo " sudo docker run -t -i --volume /local_folder/:/root/sample/output/ favad /bin/bash" echo " sudo docker run -t -i --volume $HOME/favad_output/:/root/sample/output/ favad /bin/bash"
echo "and, once in the container" echo "and, once in the container"
echo " cd /root/sample/" echo " cd /root/sample/"
echo " python3 FaVaD.py -p /root/sample/parameters.txt" echo " python3 FaVaD.py -p /root/sample/parameters.txt"
echo echo
# Disarming trap and exit
trap - EXIT
exit 0 exit 0
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