Skip to content

Commit

Permalink
update project instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
n-gao committed Aug 22, 2024
1 parent a48b2ec commit d7d8f31
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions templates/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ This template combines three libraries to give you some basic training infrastru


## Installation (Quick Guide)
Install your project editably with dependencies
We highly recommend using [`uv`](https://docs.astral.sh/uv/) for reproducible project management:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
To setup the right environment and activate it use
```sh
pip install -e .
uv sync
source .venv/bin/activate
```
*Optionally*: Install pre-commit hooks via
```sh
Expand All @@ -17,6 +22,16 @@ pre-commit install

## Developement

**Project management**

For project management, we recommend [`uv`](https://docs.astral.sh/uv/). Please read the docs carefully. Here are the most important commands
* To add a package to your project use: `uv add <package>`, e.g., `uv add jax[cuda12]`.
* To update your environment: `uv sync`.
* To run a script without explicitly activating the environment, use `uv run main.py`.
* Activate your environment: `source .venv/bin/activate`

`uv` will create a lock file that exactly describes your current environment. Make sure to commit it. To recreate this environment, use `uv sync --locked`. This lock file enables the exact reproducibility of your current environment.

**IDE**

We recommend [VS Code](https://code.visualstudio.com) for development. Select the conda environment you created earlier as your default python interpreter. *Optionally*, use static typecheckers and linters like [ruff](https://github.com/astral-sh/ruff).
Expand Down

0 comments on commit d7d8f31

Please sign in to comment.