-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to the documentation and code quality (#17)
* Improvements to the documentation and code quality * Added status badge * Added README.md for Conda directory
- Loading branch information
1 parent
eaa8210
commit c80d538
Showing
38 changed files
with
1,140 additions
and
575 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 170 | ||
extend-ignore = E203 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
- name: install pre-commit | ||
run: | | ||
pip install --upgrade pip | ||
pip install pre-commit jupyter | ||
pre-commit install | ||
- name: run pre-commit hooks | ||
run: | | ||
pre-commit run --color=always --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: jupyter-nb-clear-output | ||
name: jupyter-nb-clear-output | ||
files: \.ipynb$ | ||
stages: [commit] | ||
language: system | ||
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
files: \.py$ | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
files: \.py$ | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Conda Virtual Environments | ||
|
||
If you use conda for managing Python virtual environments, first you need to install either [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/) or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html). | ||
|
||
# 1 Libmamba Solver | ||
|
||
Conda's own solver is very slow, so I recommend using `Libmamba`. To use the new solver, first update conda in the base environment (optional step): | ||
|
||
```bash | ||
conda update -n base conda | ||
``` | ||
|
||
Then install and activate `Libmamba` as the solver: | ||
|
||
```bash | ||
conda install -n base conda-libmamba-solver | ||
conda config --set solver libmamba | ||
``` | ||
|
||
# 2 Environments | ||
|
||
Following YAML configuration files for Conda environments are available: | ||
|
||
* [gst-pytorch-gpu.yml](./gst-pytorch-gpu.yml) | ||
* **Environment name:** gst-pytorch-gpu | ||
* **Contains:** python 3.9, pytorch, pytorch-cuda=11.6, gstreamerm, matplotlib, numpy | ||
|
||
You can create a new virtual environment as follows: | ||
|
||
```bash | ||
conda env create -f <NAME-OF-THE-FILE> | ||
``` | ||
|
||
Once the environment has been created, you can activate it by executing the following command: | ||
|
||
```bash | ||
conda activate <NAME-OF-THE-ENVIRONMENT> | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.