# litenv
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
This file will become your README and also the index of your
documentation.
## Developer Guide
### Setup
``` sh
# create conda environment
$ mamba env create -f env.yml
# update conda environment
$ mamba env update -n litenv --file env.yml
# $ mamba env update -n litenv --file env.mac.yml
```
### Install
``` sh
pip install -e .
# install from pypi
pip install litenv
```
### nbdev
``` sh
# activate conda environment
$ conda activate litenv
# make sure the litenv package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the litenv package
$ nbdev_prepare
```
### Publishing
``` sh
# publish to pypi
$ nbdev_pypi
# publish to conda
$ nbdev_conda --build_args '-c conda-forge'
```
# Usage
## Installation
Install latest from the GitHub
[repository](https://github.com/dsm-72/litenv):
``` sh
$ pip install git+https://github.com/dsm-72/litenv.git
```
or from [conda](https://anaconda.org/dsm-72/litenv)
``` sh
$ conda install -c dsm-72 litenv
```
or from [pypi](https://pypi.org/project/litenv/)
``` sh
$ pip install litenv
```
## Documentation
Documentation can be found hosted on GitHub
[repository](https://github.com/dsm-72/litenv)
[pages](https://dsm-72.github.io/litenv/). Additionally you can find
package manager specific guidelines on
[conda](https://anaconda.org/dsm-72/litenv) and
[pypi](https://pypi.org/project/litenv/) respectively.
``` shell
$ litenv --help
```
| Option | Short Option | Type | Description | Default Value |
|------------------------|--------------|------|----------------------------------------------------------------------------------|----------------------------------------------------------|
| `--name` | `-n` | TEXT | The name of the environment you want to make. | `litenv` |
| `--file` | `-f` | TEXT | The YAML file to save the environment specifications to. | `env.yml` |
| `--theme` | `-t` | TEXT | The theme from which to style choices. | `blue_night` |
| `--specification-file` | `-s` | TEXT | The template file from which to generate choices. | `/Users/solst/Projects/litenv/litenv/../data/litenv.yml` |
| `--prefix-name` | `-p` | | Prefix the environment name to the YAML file. | `True` |
| `--print-tree` | `-r` | | Print the dependency tree. | |
| `--conda` | `-c` | | Use conda to create the environment. Otherwise, use mamba. | |
| `--make-env` | `-m` | | Create the environment. | |
| `--install-completion` | | | Install completion for the current shell. | |
| `--show-completion` | | | Show completion for the current shell, to copy it or customize the installation. | |
| `--help` | | | Show this message and exit. | |
## Specification File
### Overview
The application specification file is a YAML (YAML Ain’t Markup
Language) file that is used to specify various configurations for your
application. It defines the requirements and dependencies for your
application, allowing you to control the environment in which your
application will run. YAML is a human-readable data serialization
language that has become a standard for configuration files in software
development and deployment.
### Structure of the Specification File
#### `python`
The `python` field specifies the required Python version for the
application. For example:
``` yaml
python: '>=3.10'
```
This entry implies that the application requires a Python version of
3.10 or higher.
#### `channels`
This field specifies additional channels that might be needed for your
application. Channels in Python are paths where packages are stored and
can be accessed when needed. For example:
``` yaml
channels:
- pytorch
- conda-forge
```
This implies that packages for the application may be sourced from the
`pytorch` or `conda-forge` channels.
#### `categories`
The `categories` field contains several subfields defining different
groups of dependencies for your application.
Each category has a `name`, a `checked` field (which may be set to true
or false, indicating whether this category should be checked by default
or not), a `dependencies` field (which lists the specific packages
required in this category), and optional `subcategories`.
Each dependency could optionally include attributes such as `channel`,
`note`, `always`, `pypi_name`, `cuda_only`, `version`, `pip_only` and
`no_arm_support`.
For example:
``` yaml
categories:
utils:
name: 'Utilities'
checked: true
dependencies:
tqdm:
always: true
pyyaml:
```
In this example, the `utils` category includes two dependencies, `tqdm`
and `pyyaml`. The `always: true` field for `tqdm` implies that this
dependency should always be included when the `utils` category is
checked.
#### `accelerators`
The `accelerators` field specifies the type of hardware accelerator that
your application supports. This includes options like ‘mps’, ‘cpu’, or
‘cuda’.
``` yaml
accelerators:
- mps
- cpu
- cuda
```
This entry implies that the application can use either MPS, CPU, or CUDA
as the hardware accelerator.
### Creating a Specification File
Creating a specification file involves defining these fields and values
to suit your application’s needs. YAML’s indentation-based scoping and
simple syntax make this task straightforward. The values to be used
depend on the requirements of your specific application.
For Python dependencies, you can often find the exact names and versions
you need by using the package management system (like pip or conda) or
by referring to the documentation of the library in question. For
hardware requirements, you will need to understand your application’s
performance needs and the capabilities of the hardware where the
application will be run.
Remember to keep the file updated as the requirements of your
application evolve. Regular updates will ensure that your application
always has the resources it needs to run efficiently.
Raw data
{
"_id": null,
"home_page": "https://github.com/dsm-72/litenv",
"name": "litenv",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "lit env litenv conda typer rich mamba environments mps accelator pytorch environments",
"author": "dsm-72",
"author_email": "sumner.magruder@yale.edu",
"download_url": "https://files.pythonhosted.org/packages/4e/35/786c619cee5758e3909391deeef46574aa9697074f343def8589f22184c7/litenv-0.0.35.tar.gz",
"platform": null,
"description": "# litenv\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThis file will become your README and also the index of your\ndocumentation.\n\n## Developer Guide\n\n### Setup\n\n``` sh\n# create conda environment\n$ mamba env create -f env.yml\n\n# update conda environment\n$ mamba env update -n litenv --file env.yml\n# $ mamba env update -n litenv --file env.mac.yml\n```\n\n### Install\n\n``` sh\npip install -e .\n\n# install from pypi\npip install litenv\n```\n\n### nbdev\n\n``` sh\n# activate conda environment\n$ conda activate litenv\n\n# make sure the litenv package is installed in development mode\n$ pip install -e .\n\n# make changes under nbs/ directory\n# ...\n\n# compile to have changes apply to the litenv package\n$ nbdev_prepare\n```\n\n### Publishing\n\n``` sh\n# publish to pypi\n$ nbdev_pypi\n\n# publish to conda\n$ nbdev_conda --build_args '-c conda-forge'\n```\n\n# Usage\n\n## Installation\n\nInstall latest from the GitHub\n[repository](https://github.com/dsm-72/litenv):\n\n``` sh\n$ pip install git+https://github.com/dsm-72/litenv.git\n```\n\nor from [conda](https://anaconda.org/dsm-72/litenv)\n\n``` sh\n$ conda install -c dsm-72 litenv\n```\n\nor from [pypi](https://pypi.org/project/litenv/)\n\n``` sh\n$ pip install litenv\n```\n\n## Documentation\n\nDocumentation can be found hosted on GitHub\n[repository](https://github.com/dsm-72/litenv)\n[pages](https://dsm-72.github.io/litenv/). Additionally you can find\npackage manager specific guidelines on\n[conda](https://anaconda.org/dsm-72/litenv) and\n[pypi](https://pypi.org/project/litenv/) respectively.\n\n``` shell\n$ litenv --help\n```\n\n| Option | Short Option | Type | Description | Default Value |\n|------------------------|--------------|------|----------------------------------------------------------------------------------|----------------------------------------------------------|\n| `--name` | `-n` | TEXT | The name of the environment you want to make. | `litenv` |\n| `--file` | `-f` | TEXT | The YAML file to save the environment specifications to. | `env.yml` |\n| `--theme` | `-t` | TEXT | The theme from which to style choices. | `blue_night` |\n| `--specification-file` | `-s` | TEXT | The template file from which to generate choices. | `/Users/solst/Projects/litenv/litenv/../data/litenv.yml` |\n| `--prefix-name` | `-p` | | Prefix the environment name to the YAML file. | `True` |\n| `--print-tree` | `-r` | | Print the dependency tree. | |\n| `--conda` | `-c` | | Use conda to create the environment. Otherwise, use mamba. | |\n| `--make-env` | `-m` | | Create the environment. | |\n| `--install-completion` | | | Install completion for the current shell. | |\n| `--show-completion` | | | Show completion for the current shell, to copy it or customize the installation. | |\n| `--help` | | | Show this message and exit. | |\n\n## Specification File\n\n### Overview\n\nThe application specification file is a YAML (YAML Ain\u2019t Markup\nLanguage) file that is used to specify various configurations for your\napplication. It defines the requirements and dependencies for your\napplication, allowing you to control the environment in which your\napplication will run. YAML is a human-readable data serialization\nlanguage that has become a standard for configuration files in software\ndevelopment and deployment.\n\n### Structure of the Specification File\n\n#### `python`\n\nThe `python` field specifies the required Python version for the\napplication. For example:\n\n``` yaml\npython: '>=3.10'\n```\n\nThis entry implies that the application requires a Python version of\n3.10 or higher.\n\n#### `channels`\n\nThis field specifies additional channels that might be needed for your\napplication. Channels in Python are paths where packages are stored and\ncan be accessed when needed. For example:\n\n``` yaml\nchannels: \n - pytorch\n - conda-forge \n```\n\nThis implies that packages for the application may be sourced from the\n`pytorch` or `conda-forge` channels.\n\n#### `categories`\n\nThe `categories` field contains several subfields defining different\ngroups of dependencies for your application.\n\nEach category has a `name`, a `checked` field (which may be set to true\nor false, indicating whether this category should be checked by default\nor not), a `dependencies` field (which lists the specific packages\nrequired in this category), and optional `subcategories`.\n\nEach dependency could optionally include attributes such as `channel`,\n`note`, `always`, `pypi_name`, `cuda_only`, `version`, `pip_only` and\n`no_arm_support`.\n\nFor example:\n\n``` yaml\ncategories:\n utils:\n name: 'Utilities'\n checked: true\n dependencies:\n tqdm:\n always: true\n pyyaml:\n```\n\nIn this example, the `utils` category includes two dependencies, `tqdm`\nand `pyyaml`. The `always: true` field for `tqdm` implies that this\ndependency should always be included when the `utils` category is\nchecked.\n\n#### `accelerators`\n\nThe `accelerators` field specifies the type of hardware accelerator that\nyour application supports. This includes options like \u2018mps\u2019, \u2018cpu\u2019, or\n\u2018cuda\u2019.\n\n``` yaml\naccelerators:\n - mps\n - cpu\n - cuda\n```\n\nThis entry implies that the application can use either MPS, CPU, or CUDA\nas the hardware accelerator.\n\n### Creating a Specification File\n\nCreating a specification file involves defining these fields and values\nto suit your application\u2019s needs. YAML\u2019s indentation-based scoping and\nsimple syntax make this task straightforward. The values to be used\ndepend on the requirements of your specific application.\n\nFor Python dependencies, you can often find the exact names and versions\nyou need by using the package management system (like pip or conda) or\nby referring to the documentation of the library in question. For\nhardware requirements, you will need to understand your application\u2019s\nperformance needs and the capabilities of the hardware where the\napplication will be run.\n\nRemember to keep the file updated as the requirements of your\napplication evolve. Regular updates will ensure that your application\nalways has the resources it needs to run efficiently.\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "quickly make pytorch environments with mamba",
"version": "0.0.35",
"project_urls": {
"Homepage": "https://github.com/dsm-72/litenv"
},
"split_keywords": [
"lit",
"env",
"litenv",
"conda",
"typer",
"rich",
"mamba",
"environments",
"mps",
"accelator",
"pytorch",
"environments"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9dd26b7f27e24dd74ddeae8288686a97354159e148812b2952bffec5c3587096",
"md5": "a2c8cc39ed160f8dde0afd16b43a6c22",
"sha256": "03bd8538c3868333c4485f1cf8a6606e97cf80e13be26cb0639ef8c65e549e8c"
},
"downloads": -1,
"filename": "litenv-0.0.35-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2c8cc39ed160f8dde0afd16b43a6c22",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 18455,
"upload_time": "2024-04-04T12:40:47",
"upload_time_iso_8601": "2024-04-04T12:40:47.058697Z",
"url": "https://files.pythonhosted.org/packages/9d/d2/6b7f27e24dd74ddeae8288686a97354159e148812b2952bffec5c3587096/litenv-0.0.35-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4e35786c619cee5758e3909391deeef46574aa9697074f343def8589f22184c7",
"md5": "511b839106d47d16ea17e24e09403d64",
"sha256": "f9ba544e96fec3c2f04013f9cdf4e1322eb189a20cf0c9ad9851735e16c2ef00"
},
"downloads": -1,
"filename": "litenv-0.0.35.tar.gz",
"has_sig": false,
"md5_digest": "511b839106d47d16ea17e24e09403d64",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 20631,
"upload_time": "2024-04-04T12:40:48",
"upload_time_iso_8601": "2024-04-04T12:40:48.367939Z",
"url": "https://files.pythonhosted.org/packages/4e/35/786c619cee5758e3909391deeef46574aa9697074f343def8589f22184c7/litenv-0.0.35.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-04 12:40:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dsm-72",
"github_project": "litenv",
"github_not_found": true,
"lcname": "litenv"
}