Xilinx recommends using Anaconda2 to operate in a virtual environment:
- Download Anaconda2
wget https://repo.anaconda.com/archive/Anaconda2-5.1.0-Linux-x86_64.sh - Run the installer (Installer requires bzip, please install it if you don't have it)
bash ./Anaconda2-5.1.0-Linux-x86_64.sh - Ensure that your .bashrc is preparing Anaconda, by including these lines
~/.bashrc: export PATH=/home/<user>/anaconda2/bin:$PATH
~/.bashrc: . /home/<user>/anaconda2/etc/profile.d/conda.sh - After updating the bashrc source it to load the new anaconda path
source ~/.bashrc - As a precaution unset PYTHONPATH to avoid conflicts with packages on your rootfs
unset PYTHONPATH
- Invoke bash (if you aren't already in bash)
bash - Create Virtual Environment
conda create --name ml-suite python=2.7 numpy=1.14.5 x264=20131218 caffe pydot pydot-ng graphviz keras scikit-learn -c conda-forge - Fix symbolic links between pre-compiled Caffe (libcaffe.so), and OpenCV
- Note: If you installed anaconda in a custom location, you will need to modify the first line of this script
bash fix_caffe_opencv_symlink.sh
- Note: If you installed anaconda in a custom location, you will need to modify the first line of this script
- Activate Environment
conda activate ml-suite - Verify your environment by importing caffe in python
python -c "import caffe" - Install TensorFlow version 1.8
pip install tensorflow==1.8 - Install Jupyter to the ml-suite env
pip install jupyter
At the moment, AWS requires root privileges to deploy on FPGAs. Follow the steps below as a work around:
- Become root
sudo su - Set Environment Variables Required by runtime
source <MLSUITE_ROOT>/overlaybins/setup.sh aws - Set User Environment Variables Required to run Anaconda
source ~centos/.bashrc - Activate the users Anaconda Virtual Environment
source activate ml-suite - The environment is setup and ready to run applications and examples.
- Set User Environment Variables Required to run Anaconda
source ~/.bashrc - Activate the users Anaconda Virtual Environment
source activate ml-suite - The environment is setup and ready to run applications and examples.