Skip to content

Commit

Permalink
simplified installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Jul 25, 2024
1 parent cde7352 commit c997792
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions docs/00_setup/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,40 @@ For ease-of-use, it is recommended to install it for your use only and to add Co

## Setting up a conda environment

You can create a conda environment using this command from the terminal:
You can create a conda environment using this commands from the terminal. It is highly recommended to install the GPU-version on a computer with an NVidia graphics card. The CPU version should work too, but some image-generation and -vision notebooks require a powerful GPU.

### GPU version (recommended)
```
conda create --name genai2 python=3.11 jupyterlab pytorch torchvision torchaudio pytorch-cuda=11.8 cudatoolkit=11.8 huggingface_hub diffusers transformers accelerate anthropic openai langchain stackview voila pandas torchmetrics scikit-learn seaborn -c pytorch -c nvidia -c conda-forge
conda env create -f https://raw.githubusercontent.com/ScaDS/generative-ai-notebooks/main/docs/00_setup/environment-gpu.yml
```

Activate the environment:
### CPU-only version
```
conda activate genai2
conda env create -f https://raw.githubusercontent.com/ScaDS/generative-ai-notebooks/main/docs/00_setup/environment-cpu.yml
```

Install some additional packaged via pip:
### Activating the environment
Activate the environment:
```
pip install python-pptx bia-bob blablado llama-index google-generativeai pygithub
conda activate genai
```

The used conda environment is also available for download as [environment.yml](environment.yml) file.
The recently used conda environment is also available for download as [environment.yml](environment.yml) file. This was tested on a laptop with an NVidia RTX 3050 mobile GPU.

## Installing ollama

To make use of the ollama-based models, please install [ollama](https://ollama.com/download). The notebooks in this folder were tested with ollama version 0.1.39

Furthermore, consider downloading these models:

[llava 1.6](https://ollama.com/library/llava), [mistral:v0.3](https://ollama.com/library/mistral:v0.3) and
[gemma](https://ollama.com/library/gemma)
[llava 1.6](https://ollama.com/library/llava), [mistral:v0.3](https://ollama.com/library/mistral:v0.3),
[gemma](https://ollama.com/library/gemma) and
[llama3.1](https://ollama.com/library/llama3.1)
```
ollama run llava
ollama run mistral:v0.3
ollama run gemma
ollama run llama3.1
```

Note: You can print out which models you have downloaded like this:
Expand All @@ -72,6 +76,8 @@ ollama list
If you plan to use the commercial language models, you need to register at their websites and acquire so called API keys. You do not need to get these keys for all exercises, but for some they might be useful.
* [OpenAI (gpt)](https://openai.com/blog/openai-api)
* [Anthropic (claude)](https://www.anthropic.com/api)
* [Google AI](https://cloud.google.com/docs/authentication/api-keys)
* [Huggingface hub](https://huggingface.co/docs/hub/en/security-tokens)

If you are German academic, you may also be eligible to acquire a free API key from Helmholtz.AI for the blablador infrastructure:
* (blablador[https://sdlaml.pages.jsc.fz-juelich.de/ai/guides/blablador_api_access/]
Expand Down

0 comments on commit c997792

Please sign in to comment.