-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:AtMoDat/atmodat_data_checker
- Loading branch information
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
Ancillary files contained in this folder: | ||
|
||
install_adc.sh: shell script to automate the installation of the atmodat data checker (adc) and the installation of Jupyter Lab with an adc kernel | ||
install_adc.sh: shell script to automate the installation of the atmodat data checker (adc). | ||
The script allows you to define the name of the conda environment in which the checker is installed. | ||
Besides the atmodat data checker, the scripts also installs CDOs, NCOs and Jupyter Lab (with a adc kernel). | ||
|
||
To use the script, please make sure the install_adc.sh is executable (chmod +x install_adc.sh). | ||
Then run the script either like | ||
./install_adc.sh | ||
--> installation of atmodat checker in conda environment named 'atmodat' | ||
./install_adc.sh myenvname | ||
--> installation of atmodat checker in conda environment named 'myenvname' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,34 @@ | ||
#!/bin/bash | ||
|
||
git clone https://github.com/AtMoDat/atmodat_data_checker.git | ||
cd atmodat_data_checker || exit | ||
|
||
|
||
if [ $# -gt 0 ] ; then | ||
new_env=$1 | ||
git clone https://github.com/AtMoDat/atmodat_data_checker.git $new_env | ||
cd $new_env || exit | ||
sed -i.bak "s/atmodat/${new_env}/" environment.yml | ||
else | ||
git clone https://github.com/AtMoDat/atmodat_data_checker.git | ||
cd atmodat_data_checker || exit | ||
fi | ||
|
||
env_name=$(sed -n 2p environment.yml |cut -d: -f2|tr -d ' ') | ||
echo "Installing atmodat checker in environment" "{$env_name}" | ||
echo "Installing atmodat checker in environment" "$env_name" | ||
|
||
conda env create # environment name is retrieved from environment.yml | ||
|
||
# shellcheck disable=SC1090 | ||
source ~/anaconda3/bin/activate "$env_name" #-- equivalent to conda activate ${env_name} in terminal | ||
#source ~/anaconda3/etc/profile.d/conda.sh | ||
|
||
mamba install --yes --file mamba_requirements.txt | ||
pip install -U -e . | ||
git submodule init | ||
git submodule update | ||
git submodule update --remote --recursive | ||
|
||
|
||
#=== install jupyterlab and create ipykernel with name of the environment | ||
|
||
#=== also install cdo and nco | ||
mamba install --yes -c conda-forge jupyterlab | ||
python -m ipykernel install --user --name "{$env_name}"kernel | ||
mamba install --yes -c conda-forge cdo nco | ||
|
||
python -m ipykernel install --user --name "$env_name"kernel | ||
|
||
echo "finished installing $env_name | ||
you can now activate the atmodat checker environment with | ||
conda activate $env_name" |