From f2a9806db8c98238ed9753b9ec7bc361e408a940 Mon Sep 17 00:00:00 2001 From: Felix Dangel Date: Thu, 9 Jan 2020 13:55:53 +0100 Subject: [PATCH] Add make conda-env --- .conda_env.yml | 14 ++++++++++++++ makefile | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .conda_env.yml diff --git a/.conda_env.yml b/.conda_env.yml new file mode 100644 index 00000000..f812dc4f --- /dev/null +++ b/.conda_env.yml @@ -0,0 +1,14 @@ +name: backpack +channels: + - pytorch + - defaults +dependencies: + - cudatoolkit=9.2=0 + - pip=19.3.1 + - python=3.7.6 + - pytorch=1.3.1=py3.7_cuda9.2.148_cudnn7.6.3_0 + - torchvision=0.4.2=py37_cu92 + - pip: + - -r requirements.txt + - -r requirements-dev.txt + - -e . diff --git a/makefile b/makefile index 14680e09..3eb52129 100644 --- a/makefile +++ b/makefile @@ -2,6 +2,7 @@ .PHONY: black black-check flake8 .PHONY: install install-dev install-devtools install-test install-lint .PHONY: test +.PHONY: conda-env .DEFAULT: help help: @@ -21,7 +22,8 @@ help: @echo " Install only the linter tools (included in install-dev)" @echo "install-test" @echo " Install only the testing tools (included in install-dev)" - + @echo "conda-env" + @echo " Create conda environment 'backpack' with dev setup" ### # Test coverage test: @@ -69,3 +71,8 @@ install-dev: install-devtools @pip install -e . @echo "Install pre-commit hooks..." @pre-commit install + +### +# Conda environment +conda-env: + @conda env create --file .conda_env.yml