ML4A Environment

A general environment for the Machine Learning for Artists guide notebooks. We're basing this environment on the default Nextjournal Keras env, which in turn is based on our default compiled-Tensorflow env. This gives us some extra CPU optimizations, as well as TensorRT.

Deps available on conda, put into a mounted environment.yml file. Note that some of the other deps are available in non-default conda channels, but other channels have proven to be unreliable at times, so we try to steer clear.

dependencies:
- tqdm
- matplotlib
- numpy
- Pillow
- scikit-image
- lxml
environment.yml
YAML

PIP-only deps, in a mounted requirements.txt.

opencv-python
imutils
dlib
face_recognition
bs4
git+https://github.com/tensorpack/tensorpack
git+https://github.com/bmcfee/RasterFairy
requirements.txt

Conda installs. We pin CUDA-related stuff into oblivion to prevent installation, because we already have those libraries mounted and extra installs cause issues.

echo 'cudnn < 0.1
cudatoolkit < 0.1
cuda < 0.1' >> /opt/conda/conda-meta/pinned

conda env update -n root -f /tmp/environment.yml
ldconfig

PIP installs.

pip install -r /tmp/requirements.txt

Clone the ml4a-guides repo, using --recursive so we get all the submodules in the tools directory.

git clone --recursive https://github.com/nextjournal/ml4a-guides
cd ml4a-guides
ln -s tools /

Run the download script to pull down example data.

cd ml4a-guides/data
./download.sh