Created
February 27, 2019 16:17
-
-
Save TomasKulhanek/90a3d214a2f682778243495e01ca616a to your computer and use it in GitHub Desktop.
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrant file to reproduce std:bad_alloc issue when launching octave=4.2.1=blas_openblash5b47107_8 installed from conda-forge | |
$script = <<-SCRIPT | |
yum install -y wget bzip2 | |
if [ ! -f Miniconda3-latest-Linux-x86_64.sh ]; then | |
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
chmod +x Miniconda3-latest-Linux-x86_64.sh | |
fi | |
export INSTALLDIR=/opt/octavebug | |
mkdir -p $INSTALLDIR | |
./Miniconda3-latest-Linux-x86_64.sh -u -b -p $INSTALLDIR | |
PATH=$PATH:$INSTALLDIR/bin | |
conda create -q -y --name py3 python=3.6 | |
conda update -n base -c defaults conda | |
#conda update -y -n root conda | |
#chown -R vagrant:vagrant $INSTALLDIR | |
conda activate py3 | |
if grep -Fxq "conda.sh" /home/vagrant/.bashrc | |
then | |
echo conda already set | |
else | |
echo . $INSTALLDIR/etc/profile.d/conda.sh >> /home/vagrant/.bashrc | |
#echo export PATH=\$PATH:$INSTALLDIR/bin >> /home/vagrant/.bashrc | |
echo conda activate py3 >> /home/vagrant/.bashrc | |
echo echo -e \"CCPi is installed into py3 environment.\\n'py3' is now activated.\\nTo deactivate, type:\\n conda deactivate\" >> /home/vagrant/.bashrc | |
fi | |
. $INSTALLDIR/etc/profile.d/conda.sh | |
conda activate py3 | |
#echo installing jupyter, octave, r notebook packages | |
conda install -q -y -c conda-forge octave=4.2.1=blas_openblash5b47107_8 | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "westlife-eu/scientific_7_gui" | |
config.vm.provider "virtualbox" do |vb| | |
# # Display the VirtualBox GUI when booting the machine | |
vb.gui = true | |
# | |
# # Customize the amount of memory on the VM: | |
vb.memory = "4096" | |
vb.cpus = "2" | |
end | |
config.vm.provision "shell", | |
inline: $script | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment