Skip to content

Commit e5566e8

Browse files
Hong Quy Nguyenquy-ng
authored andcommitted
Update README.md
Signed-off-by: Hong Quy Nguyen <dongchirua@users.noreply.github.com> Update README.md Signed-off-by: Hong Quy Nguyen <dongchirua@users.noreply.github.com>
1 parent cc19fdd commit e5566e8

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ENV_NAME=ml-venv

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ celerybeat.pid
120120
*.sage.py
121121

122122
# Environments
123-
.env
124123
.venv
125124
env/
126125
venv/

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Project Templete to Kickoff Machine Learning Project
2-
> This template currently requires `Python 3.11` installed (`conda`) or be a default Python version (`poetry`)
2+
> This template currently uses `Python 3.11`, and either `conda`, `docker`, `poetry`, or `micromamba`
33
44
Template project aims to promote *versioning library*, *environment isolation* practice and help all ML practitioners quickly start a project. Using this template, practitioners will have below libraries
55
+ Pytorch
@@ -17,7 +17,7 @@ Template project aims to promote *versioning library*, *environment isolation* p
1717

1818
Those libraries of course aren't enough, but it's easy to update other libraries that support your project.
1919

20-
> Using `poetry` is highly recommended.
20+
> Using `poetry` is highly recommended. If you are using `conda` or `micromamba`, make sure that you use package hashes to ensure package selection is reproducible via `conda-lock` or `micromamba`
2121
2222
## Install library dependencies
2323
### With `poetry`
@@ -60,6 +60,16 @@ conda env update --file binder/environment.yml --prune
6060
conda env export --from-history -f binder/environment.yml
6161
```
6262

63+
### With `docker`
64+
- This tutorial is for those who have NVIDIA GPU (hereafter GPU). For CPU case, this should be similar but need to adjust `Dockerfile` and `run_docker.sh`
65+
- Note: Docker will use `micromamba` instead of `miniconda`. Replace `conda` with `micromamba` in your usual commands
66+
- You need to install `docker`
67+
- Install Nvidia driver (ignore if you don't have GPU)
68+
- Then install [Nvidia docker container toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html), ignore if you aim to use CPU.
69+
- Edit `.env` locates the same level with `run_docker.sh`, to add environment variables to the prospective docker container
70+
- There is a file named `run_docker.sh`, allow to execute it by `chmod +x run_docker.sh` and run `run_docker.sh`
71+
- Enjoy Jupyter lab at localhost:8888 as usual
72+
6373
## After installing libraries, verify
6474
try this in `ipython`
6575
```python
@@ -88,3 +98,6 @@ If you aim to follow `conda`
8898
- edit file `environment.yml`
8999
- create a new environment that has the version you want
90100
- switch to that environment
101+
102+
## Current limitation
103+
- `torch_geometric` with CPU version in `poetry` has a problem. I created a discussion at https://github.com/pyg-team/pytorch_geometric/discussions/7788

0 commit comments

Comments
 (0)