mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-12-25 06:02:07 +00:00
image resizing
This commit is contained in:
parent
4c45c37c51
commit
f6896d17ef
@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
There are several different ways you can install Python and set up your computing environment. Here, I am illustrating my personal preference.
|
||||
There are several different ways you can install Python and set up your computing environment. Here, I am illustrating my personal preference.
|
||||
|
||||
(I am using computers running macOS, but this workflow is similar for Linux machines and may work for other operating systems as well.)
|
||||
|
||||
@ -12,9 +12,9 @@ There are several different ways you can install Python and set up your computin
|
||||
|
||||
Download miniforge from the GitHub repository [here](https://github.com/conda-forge/miniforge).
|
||||
|
||||
<img src="figures/download.png" alt="download" style="zoom:33%;" />
|
||||
<img src="figures/download.png" alt="download" width="600px">
|
||||
|
||||
Depending on your operating system, this should download either an `.sh` (macOS, Linux) or `.exe` file (Windows).
|
||||
Depending on your operating system, this should download either an `.sh` (macOS, Linux) or `.exe` file (Windows).
|
||||
|
||||
For the `.sh` file, open your command line terminal and execute the following command
|
||||
|
||||
@ -24,7 +24,7 @@ sh ~/Desktop/Miniforge3-MacOSX-arm64.sh
|
||||
|
||||
where `Desktop/` is the folder where the Miniforge installer was downloaded to. On your computer, you may have to replace it with `Downloads/`.
|
||||
|
||||
<img src="figures/miniforge-install.png" alt="miniforge-install" style="zoom:33%;" />
|
||||
<img src="figures/miniforge-install.png" alt="miniforge-install" width="600px">
|
||||
|
||||
Next, step through the download instructions, confirming with "Enter".
|
||||
|
||||
@ -38,7 +38,7 @@ After the installation was successfully completed, I recommend creating a new vi
|
||||
conda create -n LLMs python=3.10
|
||||
```
|
||||
|
||||
<img src="figures/new-env.png" alt="new-env" style="zoom:33%;" />
|
||||
<img src="figures/new-env.png" alt="new-env" width="600px">
|
||||
|
||||
> Many scientific computing libraries do not immediately support the newest version of Python. Therefore, when installing PyTorch, it's advisable to use a version of Python that is one or two releases older. For instance, if the latest version of Python is 3.13, using Python 3.10 or 3.11 is recommended.
|
||||
|
||||
@ -48,7 +48,7 @@ Next, activate your new virtual environment (you have to do it every time you op
|
||||
conda activate dl-workshop
|
||||
```
|
||||
|
||||
<img src="figures/activate-env.png" alt="activate-env" style="zoom:33%;" />
|
||||
<img src="figures/activate-env.png" alt="activate-env" width="600px">
|
||||
|
||||
## Optional: styling your terminal
|
||||
|
||||
@ -66,13 +66,13 @@ To install new Python libraries, you can now use the `conda` package installer.
|
||||
conda install jupyterlab watermark
|
||||
```
|
||||
|
||||
<img src="figures/conda-install.png" alt="conda-install" style="zoom:33%;" />
|
||||
<img src="figures/conda-install.png" alt="conda-install" width="600px">
|
||||
|
||||
|
||||
|
||||
You can also still use `pip` to install libraries. By default, `pip` should be linked to your new `LLms` conda environment:
|
||||
|
||||
<img src="figures/check-pip.png" alt="check-pip" style="zoom:33%;" />
|
||||
<img src="figures/check-pip.png" alt="check-pip" width="600px">
|
||||
|
||||
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ To install these requirements most conveniently, you can use the `requirements.t
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||

|
||||
|
||||
Then, after completing the installation, please check if all the packages are installed and are up to date using
|
||||
|
||||
@ -27,21 +26,20 @@ Then, after completing the installation, please check if all the packages are in
|
||||
python_environment_check.py
|
||||
```
|
||||
|
||||

|
||||
<img src="figures/check_1.jpg" width="600px">
|
||||
|
||||
It's also recommended to check the versions in JupyterLab by running the `jupyter_environment_check.ipynb` in this directory, which should ideally give you the same results as above.
|
||||
|
||||

|
||||
<img src="figures/check_2.jpg" width="500px">
|
||||
|
||||
If you see the following issues, it's likely that your JupyterLab instance is connected to wrong conda environment:
|
||||
|
||||

|
||||
<img src="figures/jupyter-issues.jpg" width="450px">
|
||||
|
||||
|
||||
In this case, you may want to use `watermark` to check if you opened the JupyterLab instance in the right conda environment using the `--conda` flag:
|
||||
|
||||

|
||||
|
||||
<img src="figures/watermark.jpg" width="350px">
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user