Repo for CMU-SEI AI Division "Hands-On Computer Vision" course for Gauntlet Delivery (No Pis)
Streamline Binder Delivery:
Google Colab delivery:
- cd into the top level of this repo
- Create a virtual environment called "venv" with the command:
python -m venv --system-site-packages venv - Activate this virtual environment before installing any packages. on Windows activate with
.\venv\Scripts\activatealternatively on either macOS or Linux activate withsource venv/bin/activate. - Your command line prompt should now indicate that the venv virtual environment is activated.
- Now that the virtual environment is activated, install any neccesary packages using
pip install - venv/ is included in the gitignore file, so any changes there will not be tracked by Git
- Instead to ensure that others who clone the repo can install the same dependencies, save them to a requirements.txt file:
pip freeze > requirements.txt - Commit and then push any changes to the requirements.txt to GitHub
- All of the packages listed in the requirements.txt file can be installed at once using
pip install -r requirements.txt - To deactivate the virtual environment simply run the command
deactivate
- First make sure your virtual environment in activated and you have installed the system requirements as detailed above with
pip install -r requirements.txt - On the command line in the top level of this repo run the follwing three commands
ipython kernel install --user --name=venvpython -m ipykernel install --user --name=venvpython -m bash_kernel.install
- Start Jupyter notebook with
jupyter notebook, a browser window with the Jupyter interface should open - Open a notebook (i.e. a .ipynb file) in that Jupyter browser window
- Click on the "Kernel" menu
- Choose "Change Kernel" and select the virtual environment kernel you created called "venv" This ensures that your Jupyter notebooks is using the Python environment from your virtual environment