Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.83 KB

conda.md

File metadata and controls

51 lines (32 loc) · 1.83 KB

One possible way to use the repository is to run all the recommender utilities directly from a local copy of the source code (without building the package). This requires installing all the necessary dependencies from Anaconda and PyPI.

To this end we provide a script, generate_conda_file.py, to generate a conda-environment yaml file which you can use to create the target environment using Python with all the correct dependencies.

Assuming the repo is cloned as Recommenders in the local system, to install a default (Python CPU) environment:

cd Recommenders
python tools/generate_conda_file.py
conda env create -f reco_base.yaml

You can specify the environment name as well with the flag -n.

Click on the following menus to see how to install Python GPU and PySpark environments:

Python GPU environment

Assuming that you have a GPU machine, to install the Python GPU environment:

cd Recommenders
python tools/generate_conda_file.py --gpu
conda env create -f reco_gpu.yaml
PySpark environment

To install the PySpark environment:

cd Recommenders
python tools/generate_conda_file.py --pyspark
conda env create -f reco_pyspark.yaml

Additionally, if you want to test a particular version of spark, you may pass the --pyspark-version argument:

python tools/generate_conda_file.py --pyspark-version 3.1.1
Full (PySpark & Python GPU) environment

With this environment, you can run both PySpark and Python GPU notebooks in this repository. To install the environment:

cd Recommenders
python tools/generate_conda_file.py --gpu --pyspark
conda env create -f reco_full.yaml