|
3 | 3 | Welcome to the PyTorch Lightning community! We're building the most advanced research platform on the planet to implement the latest, best practices |
4 | 4 | and integrations that the amazing PyTorch team and other research organization rolls out! |
5 | 5 |
|
6 | | -If you are new to open source, check out [this blog to get started with your first Open Source contribution](https://devblog.pytorchlightning.ai/quick-contribution-guide-86d977171b3a). |
| 6 | +If you are new to open source, check out [this blog to get started with your first Open Source contribution](https://medium.com/pytorch-lightning/quick-contribution-guide-86d977171b3a). |
7 | 7 |
|
8 | 8 | ## Main Core Value: One less thing to remember |
9 | 9 |
|
@@ -109,6 +109,50 @@ ______________________________________________________________________ |
109 | 109 |
|
110 | 110 | ## Guidelines |
111 | 111 |
|
| 112 | +### Development environment |
| 113 | + |
| 114 | +To set up a local development environment, we recommend using `uv`, which can be installed following their [instructions](https://docs.astral.sh/uv/getting-started/installation/). |
| 115 | + |
| 116 | +Once `uv` has been installed, begin by cloning the forked repository: |
| 117 | + |
| 118 | +```bash |
| 119 | +git clone https://github.com/{YOUR_GITHUB_USERNAME}/pytorch-lightning.git |
| 120 | +cd pytorch-lightning |
| 121 | +``` |
| 122 | + |
| 123 | +> If you're using [Lightning Studio](https://lightning.ai) or already have your `uv venv` activated, you can quickly set up the project by running: |
| 124 | +
|
| 125 | +```bash |
| 126 | +make setup |
| 127 | +``` |
| 128 | + |
| 129 | +This will: |
| 130 | + |
| 131 | +- Install all required dependencies. |
| 132 | +- Perform an editable install of the `pytorch-lightning` project. |
| 133 | +- Install and configure `pre-commit`. |
| 134 | + |
| 135 | +#### Manual Setup (Optional) |
| 136 | + |
| 137 | +If you prefer more fine-grained control over the dependencies, you can set up the environment manually: |
| 138 | + |
| 139 | +```bash |
| 140 | +uv venv |
| 141 | +# uv venv --python 3.11 # use this instead if you need a specific python version |
| 142 | + |
| 143 | +source .venv/bin/activate # command may differ based on your shell |
| 144 | +uv pip install ".[dev, examples]" |
| 145 | +``` |
| 146 | + |
| 147 | +Once the dependencies have been installed, install pre-commit and set up the git hook scripts: |
| 148 | + |
| 149 | +```bash |
| 150 | +uv pip install pre-commit |
| 151 | +pre-commit install |
| 152 | +``` |
| 153 | + |
| 154 | +If you would like more information regarding the uv commands, please refer to uv's documentation for more information on their [pip interface](https://docs.astral.sh/uv/pip/). |
| 155 | + |
112 | 156 | ### Developments scripts |
113 | 157 |
|
114 | 158 | To build the documentation locally, simply execute the following commands from project root (only for Unix): |
|
0 commit comments