backyard/automamba/README.md

37 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2024-02-15 17:34:50 -08:00
this script works on both Windows and Linux, however i have yet to add
the feature to automatically acquire a compiler on Linux (Windows gets MSVC).
also note that this script only works on x86\_64 systems,
and when it comes to Linux, it won't run on musl-based OSes
(you should have `/lib64/ld-linux-x86-64.so.2` on your disk)
-- sorry, Alpine users!
this is limitation is largely imposed by the conda ecosystem.
2022-06-12 21:44:44 -07:00
2024-02-15 17:12:34 -08:00
if you want to change the packages installed by default,
you'll need to edit the `main_packages` and `pypi_packages`
arrays within the script.
2022-06-12 21:44:44 -07:00
### examples
2024-02-15 17:35:09 -08:00
* `automamba hello.py`
2022-06-12 21:44:44 -07:00
invoke python to execute a local python file.
a new environment will be created if none have been made.
2024-02-15 17:35:09 -08:00
* `automamba -c 'print("Hello, world!")'`
2024-02-15 17:12:34 -08:00
same as the above, but with the program given on the command-line instead.
2024-02-15 17:35:09 -08:00
* `automamba --create`
2024-02-15 17:12:34 -08:00
create a new environment. do this once in a while to keep your packages up to date.
2024-02-15 17:35:09 -08:00
* `AM_ENV=aws automamba --create -c conda-forge 'awscli>=2,<3'`
2024-02-15 17:12:34 -08:00
create an environment called "aws" and install `awscli` version 2
from the conda-forge channel.
2024-02-15 17:35:09 -08:00
* `AM_ENV=aws automamba -m awscli ec2 describe-instances`
2024-02-15 17:12:34 -08:00
run an AWS command using the previously created environment.
2024-02-15 17:35:09 -08:00
* `automamba --pip install scipybiteopt==1.2`
2022-06-12 21:44:44 -07:00
invoke pip to build and install a package. MSVC will be installed if it isn't already,
since this example requires a C++ compiler.
2024-02-15 17:35:09 -08:00
* `automamba --mamba repoquery depends pip`
2022-06-12 21:44:44 -07:00
invoke mamba to look up dependencies.
2024-02-15 17:35:09 -08:00
* `automamba --wheel`
2022-06-12 21:44:44 -07:00
execute `./setup.py` with `bdist_wheel` as an argument.
this configures environment variables similarly to the `--pip` command.
(this command will probably be removed in the near future)