Last active
February 9, 2019 15:04
-
-
Save sbourdeauducq/749ac7771eff9f43042c02adcea8c839 to your computer and use it in GitHub Desktop.
Install ARTIQ from hydra conda packages
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
#!/bin/sh | |
set -e | |
# This script needs to be run in the root conda environment. | |
# The name of the conda environment to create | |
CONDA_ENV_NAME=artiq | |
# The conda packages to download from hydra and install | |
CONDA_PACKAGES="artiq artiq-board-kasli-tester" | |
# Comment those out if you have already set up conda channels | |
conda config --prepend channels m-labs | |
conda config --add channels conda-forge | |
# You should not need to modify the rest of the script below. | |
conda install -y conda-build wget | |
# Another great conda design decision is to ignore dependencies when installing .tar.bz2's directly. | |
# Work around it by creating a channel for our packages. | |
CHANNEL_DIR=`mktemp -d` | |
echo "Creating conda channel in $CHANNEL_DIR..." | |
pushd $CHANNEL_DIR | |
mkdir noarch | |
for p in $CONDA_PACKAGES; do | |
NIX_JOB=conda-$p | |
wget https://nixbld.m-labs.hk/job/artiq/master/$NIX_JOB/latest/download-by-type/file/conda -4 --content-disposition -P noarch | |
done | |
conda index | |
popd | |
# Creating the environment first with python 3.5 hits fewer bugs in conda's broken dependency solver. | |
conda create -y -n $CONDA_ENV_NAME python=3.5 | |
source activate $CONDA_ENV_NAME | |
for p in $CONDA_PACKAGES; do | |
conda install -y -c file://$CHANNEL_DIR $p | |
done | |
rm -rf $CHANNEL_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment