ascender_playground
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: koonn
- License: mit
- Language: Dockerfile
- Default Branch: develop
- Size: 68.4 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
Ascender
What is Ascender?
Ascender (Accelerator of SCiENtific DEvelopment and Research) is a GitHub repository template designed for research projects using Python. It incorporates several pre-implemented features to expedite development:
- Containerization: Dependency minimization and code portability enhancement using Docker.
- Virtual Environment / Package Management: Development environment reproducibility ensured by Poetry.
- Coding Style: Automatic code linting and formatting with Ruff.
- Static Type Checking: Early bug detection assisted by Mypy.
- Testing: Testing simplification achieved through pytest.
- GitHub Integration: Integration features including GitHub Actions workflows, issue templates, and more.
Please also view resources about Ascender (in Japanese).
Project Organization
├── .github/ <- GitHub settings.
│
├── data/ <- Datasets.
│
├── environments/ <- Environment-specific configurations.
│
├── models/ <- Pretrained and serialized models.
│
├── notebooks/ <- Jupyter notebooks.
│
├── outputs/ <- Outputs.
│
├── src/ <- Python Source code.
│
├── tests/ <- Test code.
│
├── .dockerignore
├── .gitignore
├── LICENSE
├── Makefile <- Commands for task automation.
├── poetry.lock <- Auto-generated lock file (do not edit manually).
├── poetry.toml <- Poetry configuration.
├── pyproject.toml <- Main project configuration file.
└── README.md <- Top-level README for developers.
Prerequisites
NOTE: The example codes in the README.md are written for Docker Compose v2. However, Ascender is also compatible with Docker Compose v1. If you are using Docker Compose v1, simply replace docker compose with docker-compose in the example commands.
Prerequisites Installation
This section provides installation instructions for Ubuntu. If you have already installed the prerequisites, you may skip this section. For installations on other operating systems, please refer to the official documentation.
- Docker and Docker Compose: Install Docker Engine
- NVIDIA Container Toolkit (nvidia-docker2): Installation Guide
Install Docker and Docker Compose
```bash
Set up the repository
$ sudo apt update $ sudo apt install ca-certificates curl gnupg lsb-release $ sudo mkdir -p /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg $ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker and Docker Compose
$ sudo apt update $ sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin ```
If sudo docker run hello-world works, the installation was successful.
(Optional) Install NVIDIA Container Toolkit
To use GPUs with Ascender, install the NVIDIA Container Toolkit as well. This toolkit has specific prerequisites, detailed in the official documentation.
```bash $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \ sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
$ sudo apt update $ sudo apt install -y nvidia-docker2 $ sudo systemctl restart docker ```
If sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base nvidia-smi works, the installation was successful.
Quick Start
This section outlines how to begin using Ascender. For more detailed information, please refer to this slide (in Japanese).
Create a GitHub Repository from Ascender
To start, you need to create your own GitHub repository from Ascender:
- Visit the GitHub repository page of Ascender.
- Click the "Use this template" button at the top right of the page.
- Complete the form and click the "Create repository from template" button.
Your new repository should now be set up in your GitHub account.
Start Development
```bash
Clone the repository
$ git clone git@github.com:cvpaperchallenge/
Build the Docker image and run the container
$ cd environments/gpu # For CPU only, navigate to environments/cpu
$ sudo docker compose up -d
Enter the container shell
$ sudo docker compose exec core bash
Set up the virtual environment and install dependencies with Poetry
$ poetry install ```
You are now ready to start developing with Ascender.
Stop Development
```bash
Stop the container
$ cd environments/gpu # Or cd environments/cpu
$ sudo docker compose stop
```
FAQ
Using Ascender Without Docker
While we recommend using Docker as described, you may encounter issues installing Docker due to permissions or other constraints.
If you cannot use Docker, Ascender can be operated without it. Simply install Poetry on your computer and proceed as described in the "Start Development" section, omitting the Docker steps.
```bash
Install Poetry
$ pip3 install poetry
Clone the repository
$ git clone git@github.com:
Set up the virtual environment and install dependencies with Poetry
$ poetry install ```
Note: The CI jobs in Ascender's GitHub Actions workflows utilize a Dockerfile. Running without Docker may cause these jobs to fail, necessitating modifications to the Dockerfile or the deletion of the CI job (.github/workflows/lint-and-test.yaml).
Permission Errors When Running poetry install
Sometimes, running poetry install may result in a permission error:
```bash $ poetry install ...
virtualenv: error: argument dest: the destination . is not write-able at /home/challenger/ascender ```
If this occurs, check your local PC's UID (user ID) and GID (group ID) with the following commands:
bash
$ id -u $USER # Check UID
$ id -g $USER # Check GID
In Ascender, the default UID and GID are both '1000'. If your local PC's UID or GID differs from this, you'll need to adjust the 'UID' or 'GID' values in 'docker-compose.yaml' to match your local settings. Alternatively, if the 'HOSTUID' and 'HOSTGID' environment variables are set on your host PC, Ascender will use these values.
Compatibility Issues Between PyTorch and Poetry
As of now, there is a known compatibility issue between PyTorch and Poetry, which the Poetry community is actively addressing. This issue is anticipated to be resolved in Poetry version 1.2.0. You can track progress and explore pre-releases of this version here.
We plan to integrate Poetry 1.2.0 into Ascender as soon as it becomes available. In the meantime, you may need to use workarounds detailed in this issue.
Related GitHub Issues
- https://github.com/python-poetry/poetry/issues/2339
- https://github.com/python-poetry/poetry/issues/2543
- https://github.com/python-poetry/poetry/issues/2613
- https://github.com/python-poetry/poetry/issues/3855
- https://github.com/python-poetry/poetry/issues/4231
- https://github.com/python-poetry/poetry/issues/4704
Changing Python Versions for CI Jobs
By default, Ascender's CI jobs run using Python 3.8 and 3.9. If you wish to target a different Python version, modify the matrix in .github/workflows/lint-and-test.yaml.
Incorrect Reflection of Dockerfile Changes in Image Builds
If you find that changes to the Dockerfile are not reflected when building the image, try the following commands:
bash
$ sudo docker compose build --no-cache
$ sudo docker compose up --force-recreate -d
When changes to the Dockerfile are not reflected correctly, the potential reasons could be:
Docker uses a cache to build the image.
Docker does not recreate a container.
The sudo docker compose build --no-cache command builds the Docker image without using the cache, addressing the first issue. The sudo docker compose up --force-recreate -d command recreates and starts the containers, addressing the second issue.
Activating/Deactivating Caching in CI Jobs
Caching was introduced in CI jobs (lint-and-tests.yaml) starting from v0.1.2 to reduce delays caused by Docker image builds and Poetry installations. However, if you prefer not to use this feature, set the USE_CACHE variable in lint-and-tests.yaml to false.
Excessive Strictness of Ruff's Code Style Constraints
If you find the style checks enforced by Ruff too stringent, you can adjust the settings in pyproject.toml under tool.ruff.[xxx].
select: Specify which Ruff style rules to apply.ignore: Set rules to be ignored during style checking.fixable: Allow automatic correction for certain fixable rules.unfixable: Specify rules that should not be automatically corrected.
For details on each rule, please refer to here. For more information on how to configure the pyproject.toml file, see here.
Owner
- Name: takahirokonno
- Login: koonn
- Kind: user
- Repositories: 1
- Profile: https://github.com/koonn
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you want to cite the framework, feel free to use this (but only if you loved it 😊)"
title: "Ascender"
abstract: "Ascender is a GitHub repository template for research projects using Python as a developing language."
date-released: 2022-10-26
authors:
- family-names: "Fukuhara"
given-names: "Yoshihiro"
- family-names: "Kubotani"
given-names: "Yoshiki"
- name: "cvpaper.challenge XCCV group"
version: 0.1.3
doi: 10.5281/zenodo.7672842
license: "MIT"
url: "https://github.com/cvpaperchallenge/Ascender"
GitHub Events
Total
Last Year
Dependencies
- actions/cache v3 composite
- actions/checkout v3 composite
- docker/setup-buildx-action v2 composite
- ${BASE_IMAGE} latest build
- appnope 0.1.4
- asttokens 2.4.1
- backcall 0.2.0
- cffi 1.16.0
- colorama 0.4.6
- comm 0.2.2
- coverage 7.5.0
- debugpy 1.8.1
- decorator 5.1.1
- exceptiongroup 1.2.1
- executing 2.0.1
- filelock 3.14.0
- fsspec 2024.3.1
- importlib-metadata 7.1.0
- iniconfig 2.0.0
- intel-openmp 2021.4.0
- ipykernel 6.29.4
- ipython 8.12.3
- jedi 0.19.1
- jinja2 3.1.3
- jupyter-client 8.6.1
- jupyter-core 5.7.2
- linkify-it-py 2.0.3
- markdown-it-py 3.0.0
- markupsafe 2.1.5
- matplotlib-inline 0.1.7
- mdformat 0.7.17
- mdformat-footnote 0.1.1
- mdformat-frontmatter 2.0.8
- mdformat-gfm 0.3.6
- mdformat-tables 0.4.1
- mdit-py-plugins 0.4.0
- mdurl 0.1.2
- mkl 2021.4.0
- mpmath 1.3.0
- mypy 1.10.0
- mypy-extensions 1.0.0
- nest-asyncio 1.6.0
- networkx 3.1
- nvidia-cublas-cu12 12.1.3.1
- nvidia-cuda-cupti-cu12 12.1.105
- nvidia-cuda-nvrtc-cu12 12.1.105
- nvidia-cuda-runtime-cu12 12.1.105
- nvidia-cudnn-cu12 8.9.2.26
- nvidia-cufft-cu12 11.0.2.54
- nvidia-curand-cu12 10.3.2.106
- nvidia-cusolver-cu12 11.4.5.107
- nvidia-cusparse-cu12 12.1.0.106
- nvidia-nccl-cu12 2.20.5
- nvidia-nvjitlink-cu12 12.4.127
- nvidia-nvtx-cu12 12.1.105
- packaging 24.0
- parso 0.8.4
- pexpect 4.9.0
- pickleshare 0.7.5
- platformdirs 4.2.1
- pluggy 1.5.0
- prompt-toolkit 3.0.43
- psutil 5.9.8
- ptyprocess 0.7.0
- pure-eval 0.2.2
- pycparser 2.22
- pygments 2.17.2
- pytest 8.1.1
- pytest-cov 5.0.0
- python-dateutil 2.9.0.post0
- pywin32 306
- pyzmq 26.0.2
- ruamel-yaml 0.18.6
- ruamel-yaml-clib 0.2.8
- ruff 0.4.1
- six 1.16.0
- stack-data 0.6.3
- sympy 1.12
- tbb 2021.12.0
- tomli 2.0.1
- torch 2.3.0
- tornado 6.4
- traitlets 5.14.3
- triton 2.3.0
- typing-extensions 4.11.0
- uc-micro-py 1.0.3
- wcwidth 0.2.13
- zipp 3.18.1
- mdformat-frontmatter ^2.0.8 develop
- mdformat-gfm ^0.3.6 develop
- mdformat_footnote ^0.1.1 develop
- mypy ^1.10.0 develop
- pytest-cov ^5.0.0 develop
- ruff ^0.4.1 develop
- ipykernel ^6.29.4
- python ^3.8
- torch ^2.3.0