https://github.com/the-full-stack/conda-piptools
Quick demo of setting up a deep learning Python environment using conda and pip-tools.
https://github.com/the-full-stack/conda-piptools
Last synced: 4 months ago
JSON representation
Quick demo of setting up a deep learning Python environment using conda and pip-tools.
- Host: GitHub
- URL: https://github.com/the-full-stack/conda-piptools
- Owner: the-full-stack
- Created: 2021-01-05T23:38:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-05T23:57:00.000Z (over 4 years ago)
- Last Synced: 2025-02-22T17:40:35.758Z (4 months ago)
- Language: Makefile
- Size: 1.95 KB
- Stars: 38
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Conda + Pip-Tools Sample Project
Quick demo of setting up a deep learning Python environment.
Our goals:
- Easily specify the exact Python, CUDA, CUDNN environment
- Humans should specify minimal constraints (`torch >= 1.7` and `numpy`), computer should figure out exact, mutually compatible versions (`torch==1.7.1; numpy==1.19.5`)
- Separate production (`torch`) from development (`black`) dependenciesWe achieve this by:
- We specify our Python and CUDA versions in `environment.yml`
- We use the `conda` package manager to create our environment from this file
- We specify our requirements in `requirements/prod.in` and `requirements/dev.in`
- We use `pip-tools` to lock in mutually compatbile versions of all requirements
- We add a `Makefile` so we can simply run `make` to update everythingTry it out by running `docker run --rm -v`pwd`:/var/task -it continuumio/miniconda /bin/bash`, and then in the container:
```
apt-get install make
cd /var/task
make
```This will set up the environment.
Don't forget to activate it by running `conda activate conda-piptools-sample-project`!