-
Couldn't load subscription status.
- Fork 45
feat: Conda/Mamba-based installation script #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
guicho271828
wants to merge
7
commits into
generative-computing:main
Choose a base branch
from
guicho271828:conda
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+96
−2
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
383d6b1
feat: conda or mamba-based installation script
guicho271828 cd00b5d
docs: conda-based installation script
guicho271828 72444c1
fix: reflect README
guicho271828 2ec0caf
feat: getopts for -h option
guicho271828 bff6c29
feat: detects an existing mellea environment and try to remove it
guicho271828 8303258
feat: added -y option
guicho271828 755d400
fix: enforce VLLM_USE_V1 = 0
guicho271828 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,9 @@ | ||
|
|
||
| name: mellea | ||
| channels: | ||
| - conda-forge | ||
| dependencies: | ||
| - python=3.12 # note: at the time of writing, xformer (< vllm) has a broken wheel for 3.13. https://github.com/facebookresearch/xformers/issues/740#issuecomment-2753869337 | ||
| - uv | ||
| variables: | ||
| VLLM_USE_V1: 0 # need this to make outlines work |
This file contains hidden or 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,71 @@ | ||
| #!/bin/bash -e | ||
|
|
||
| CONDA="" | ||
| if which mamba > /dev/null | ||
| then | ||
| CONDA=$(which mamba) | ||
| fi | ||
| if which conda > /dev/null | ||
| then | ||
| CONDA=$(which conda) | ||
| fi | ||
|
|
||
| if [ -z $CONDA ] | ||
| then | ||
| echo "Error: conda or mamba is not installed or is not in the PATH." | ||
| echo "Go to " | ||
| echo "* https://github.com/conda-forge/miniforge (open source)" | ||
| echo "* https://www.anaconda.com/download/success (registration required)" | ||
| echo "to obtain a conda/mamba installer." | ||
| else | ||
| echo "Using $CONDA for environment setup" | ||
| fi | ||
|
|
||
|
|
||
| usage(){ | ||
| echo "Usage: install.sh [-h] [-y]" | ||
| echo | ||
| echo "-h : show this help" | ||
| echo "-y : Adds '-y' option to '$CONDA env [create|remove|...]' command arguments." | ||
| exit 1 | ||
| } | ||
|
|
||
| CONDA_OPTIONS="" | ||
| while getopts "yh" OPTNAME ; do | ||
| case "${OPTNAME}" in | ||
| h) | ||
| usage | ||
| ;; | ||
| y) | ||
| CONDA_OPTIONS="-y" | ||
| shift 1 | ||
| ;; | ||
| :) | ||
| # If expected argument omitted: | ||
| echo "Error: -${OPTARG} requires an argument." | ||
| exit 1 | ||
| ;; | ||
| *) | ||
| # If unknown (any other) option: | ||
| echo "Error: -${OPTARG} unknown." | ||
| exit 1 | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| if $CONDA env list | grep -q mellea | ||
| then | ||
| echo "An existing mellea environment was found." | ||
| $CONDA env remove $CONDA_OPTIONS -n mellea | ||
| fi | ||
|
|
||
|
|
||
| # note: | ||
| # this is a portable way (works in linux and osx) to get the directory of this script. | ||
| # readlink -ef may not work on osx. | ||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| $CONDA env create $CONDA_OPTIONS -f $SCRIPT_DIR/environment.yml | ||
|
|
||
| $CONDA run -n mellea uv pip install -e .[all] --group dev --group notebook --group docs | ||
|
|
||
| $CONDA run -n mellea pre-commit install | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.