https://github.com/tf63/pytorch-template
https://github.com/tf63/pytorch-template
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tf63/pytorch-template
- Owner: tf63
- License: mit
- Created: 2023-12-22T08:54:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-29T05:57:39.000Z (over 1 year ago)
- Last Synced: 2025-01-27T05:39:13.870Z (4 months ago)
- Language: OpenEdge ABL
- Size: 118 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# python project
GPU環境用のpythonテンプレート
### 用法
イメージのビルド
```
bash docker.sh build
```コンテナの起動
```
bash docker.sh shell
```poetry周り
```
poetry install # pyproject.tomlからインストール
poetry add <パッケージ名> # パッケージをインストール
poetry remove <パッケージ名> # パッケージを削除
```### 備考
torchをpoetryで入れればワークディレクトリ配下の`.venv/`にtorchが入ってくれる
そうするとVSCodeにコンテナをアタッチしなくとも仮想環境が使える
しかし,ワークスペースごとにtorch (1.8GB)を入れる必要があるので注意
```
poetry add https://download.pytorch.org/whl/cu117/torch-1.13.0%2Bcu117-cp38-cp38-linux_x86_64.whl
poetry add https://download.pytorch.org/whl/cu117/torchvision-0.14.0%2Bcu117-cp38-cp38-linux_x86_64.whl
```### 参考リンクなど
setuptools
https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/
semantic version
https://semver.org/
formatter linter周り
https://data.gunosy.io/entry/linter_option_on_pyproject