HelperSheets/docker/unsloth/README.md

43 lines
1.6 KiB
Markdown
Raw Normal View History

2024-09-21 10:56:21 +02:00
# Unsloth in a docker container
❗ Very important ❗
The complete docker image is designed for CUDA 12.1!
2024-09-21 11:17:25 +02:00
There must be a compatible version on the host such as <span style="color: red;">CUDA 12.2</span> and <span style="color: skyblue;">docker</span> has to be installed.
2024-09-21 10:56:21 +02:00
Run `nvidia-smi` on the Host to see if you are using the right Conda version.
![nvidia-smi](./assets/nvidiasmi.png)
Build the container with:
```shell
docker build -t cuda-unsloth-jupyter .
```
And mount your directory to the ```/app``` path when starting.
2024-09-21 11:14:51 +02:00
Setting default password to: `123`
2024-09-21 10:56:21 +02:00
```shell
2024-09-21 11:14:51 +02:00
docker run --rm --gpus=all -v path_to_files:/app -e JUPYTER_TOKEN='123' -p 8088:8088 -d cuda-unsloth-jupyter
2024-09-21 10:56:21 +02:00
```
```--rm```: This flag automatically deletes the container after it exits, freeing up disk space and keeping the environment clean. Add the `-it` flag to run the container in interactive mode, giving you direct access to its shell. Use `-d` to detach the container and run it in the background. Combining `-itd` allows you to interact with the container initially, then detach, leaving it running in the background.
2024-09-21 11:21:29 +02:00
### GPU Testing Information
2024-09-21 10:56:21 +02:00
2024-09-21 11:21:29 +02:00
#### Currently Tested Configuration
2024-09-21 11:14:51 +02:00
2024-09-21 11:21:29 +02:00
| **GPU Model** | **Memory (GB)** |
|-----------------|-----------------|
| RTX 3090 Ti | 24 |
#### System Details
- **Operating System:** Windows 10
- **CUDA Version:** 12.2
#### Please note:
2024-09-21 11:14:51 +02:00
If you are using a different graphics card or a different Pytorch version, then you must adapt the Dockerfile accordingly. See:
[docs.unsloth.ai](https://docs.unsloth.ai/get-started/installation/pip-install)