OpenWPM/scripts/repin.sh

30 строки
946 B
Bash
Исходник Постоянная ссылка Обычный вид История

2020-05-14 02:12:30 +03:00
#!/bin/bash
# This script re-creates environment.yaml
# This script will remove an existing openwpm
# conda environment if it exists.
set -e
# Make conda available to shell script
eval "$(conda shell.bash hook)"
# Create openwpm env with unpinned yaml file
# `PYTHONNOUSERSITE` set so python ignores local user site libraries when building the env
2021-12-20 18:47:32 +03:00
# See: https://github.com/openwpm/OpenWPM/pull/682#issuecomment-645648939
PYTHONNOUSERSITE=True conda env create --force -q -f environment-unpinned.yaml
2020-05-14 02:12:30 +03:00
# Activate
conda activate openwpm
2020-05-14 03:10:15 +03:00
# Adding dev dependencies to environment
PYTHONNOUSERSITE=True conda env update -f environment-unpinned-dev.yaml
2020-05-14 03:10:15 +03:00
2020-05-14 02:12:30 +03:00
# Export the environment including manually specify channels
2020-05-14 10:51:33 +03:00
conda env export --no-builds --override-channels -c conda-forge -c main -f ../environment.yaml
2020-05-14 02:12:30 +03:00
# Prune environment file to only things we want to pin
python prune-environment.py
2020-05-14 02:12:30 +03:00
echo 'New environment.yaml successfully created.'