Skip to content

Commit

Permalink
Improve getting started with a micromamba environment. (#163)
Browse files Browse the repository at this point in the history
feat: make getting starting with rattler easier by using a micromamba environment
  • Loading branch information
ruben-arts authored Apr 12, 2023
1 parent bb05f16 commit a51b3ca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,27 @@ This is an example of installing an environment containing `cowpy` and all its d

![Installing an environment](/assets/showcase_create.gif)

## Try it yourself!
## Give it a try!

To get started with the code:
Before you begin, make sure you have the following prerequisites:
- A recent version of [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- A recent version of [micromamba](https://github.com/mamba-org/micromamba-releases)

* make sure you downloaded the repository (including submodules),
* have a working Rust installation on your system,
* have a `c` compiler and `cmake` installed (needed for libsolv).
Follow these steps to clone, compile, and run the rattler project:
```shell
# Clone the rattler repository along with its submodules:
git clone --recursive https://github.com/mamba-org/rattler.git
cd rattler

Then run:
# Set up an environment with the required dependencies for compiling rattler and libsolve:
micromamba create -f environment.yml
micromamba activate rattler-env

```shell
cargo run --release create jupyterlab
# Compile and execute rattler to create a JupyterLab instance:
cargo run --release --bin rattler create jupyterlab
```

The above command will execute the `rattler-bin` executable in release mode.
The above command will execute the `rattler` executable in release mode.
It will download and install an environment into the `.prefix` folder that contains [`jupyterlab`](https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html) and all the dependencies required to run it (like `python`)

Run the following command to start jupyterlab:
Expand Down
13 changes: 13 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: rattler-env
channels:
- conda-forge
dependencies:
# Needed for building rattler
- rust =>1.65.0
- openssl
- pkg-config

# Needed for building libsolve
- cxx-compiler
- cmake
- make

0 comments on commit a51b3ca

Please sign in to comment.