https://github.com/tf63/python-workspace
Pythonの作業環境
https://github.com/tf63/python-workspace
Last synced: 4 months ago
JSON representation
Pythonの作業環境
- Host: GitHub
- URL: https://github.com/tf63/python-workspace
- Owner: tf63
- License: mit
- Created: 2023-08-03T08:24:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T22:39:46.000Z (almost 2 years ago)
- Last Synced: 2024-02-15T23:40:55.187Z (almost 2 years ago)
- Language: Jupyter Notebook
- Homepage:
- 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