Skip to content

Instantly share code, notes, and snippets.

@achilleas-k
Last active October 11, 2016 12:24
Show Gist options
  • Save achilleas-k/a0287241c295ee3bf5d8fecf41a5e82c to your computer and use it in GitHub Desktop.
Save achilleas-k/a0287241c295ee3bf5d8fecf41a5e82c to your computer and use it in GitHub Desktop.
NIXPy install test dockerfile
FROM base/archlinux
# image is a bit old so we need to update the keyring first
RUN pacman -Sy --noconfirm archlinux-keyring
# and then pacman itself
RUN pacman -Sy --noconfirm pacman
# db version update - upgrading
RUN pacman-db-upgrade
# Syu for freshness
RUN pacman -Syu --noconfirm
# python pips
RUN pacman -Syu --noconfirm python-pip python2-pip
# install nixpy from pip without nix
RUN pip install nixio
RUN python -c "import nixio"
# same for py2
RUN pip2 install nixio
RUN python2 -c "import nixio"
# trying to access nixio.core should fail
RUN ! python -c "import nixio; nixio.core" && echo "SUCCESSFULLY FAILED"
RUN ! python2 -c "import nixio; nixio.core" && echo "SUCCESSFULLY FAILED"
# now build nix from source to try reinstalling nixpy with nix backend support
WORKDIR /src
RUN pacman -Syu --noconfirm git base-devel cmake hdf5 boost boost-libs cppunit
RUN git clone https://github.com/G-Node/nix
WORKDIR nix/build
RUN cmake ..
RUN make
RUN make install
# reinstall nixpy
RUN pip install -U --force-reinstall nixio
RUN python -c "import nixio; nixio.core"
RUN pip2 install -U --force-reinstall nixio
RUN python2 -c "import nixio; nixio.core"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment