https://github.com/bast/apptainer-venv
Fast Python virtual environments on Apptainer.
https://github.com/bast/apptainer-venv
apptainer singularity venv
Last synced: 9 months ago
JSON representation
Fast Python virtual environments on Apptainer.
- Host: GitHub
- URL: https://github.com/bast/apptainer-venv
- Owner: bast
- License: mit
- Created: 2021-09-26T12:13:38.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-02T12:10:06.000Z (about 1 year ago)
- Last Synced: 2025-09-09T16:16:11.327Z (9 months ago)
- Topics: apptainer, singularity, venv
- Homepage:
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fast Python virtual environments on [Apptainer](https://apptainer.org/)
I use it to install dependencies that may be tough to install on my NixOS environment.
How to fetch the image:
```
$ apptainer pull https://github.com/bast/apptainer-venv/releases/download/0.7.0/venv.sif
```
## Usage
- Reads: `requirements.txt`
- Creates: `venv` (folder)
Run `myscript.py` inside the virtual environment defined by `requirements.txt`:
```
$ ./venv.sif python myscript.py
```
Open python shell inside the virtual environment defined by `requirements.txt`:
```
$ ./venv.sif python
```
## Acknowledgements
- To build the image, I have used
[this wonderful guide](https://github.com/singularityhub/singularity-deploy) as starting
point and inspiration.