mirror of
https://github.com/aladdinpersson/Machine-Learning-Collection.git
synced 2026-04-10 12:33:44 +00:00
updated readme for docker
This commit is contained in:
55
README.md
55
README.md
@@ -142,32 +142,51 @@ If you have any specific video suggestion please make a comment on YouTube :)
|
|||||||
* [![Youtube Link][logo]](https://youtu.be/ea5Z1smiR3U) [Tutorial 20 - Classifying Skin Cancer](https://github.com/AladdinPerzon/Machine-Learning-Collection/tree/master/ML/TensorFlow/Basics/tutorial20-classify-cancer-beginner-project-example) **- Beginner Project Example**
|
* [![Youtube Link][logo]](https://youtu.be/ea5Z1smiR3U) [Tutorial 20 - Classifying Skin Cancer](https://github.com/AladdinPerzon/Machine-Learning-Collection/tree/master/ML/TensorFlow/Basics/tutorial20-classify-cancer-beginner-project-example) **- Beginner Project Example**
|
||||||
|
|
||||||
## Docker Setup
|
## Docker Setup
|
||||||
Follow the steps below to use Docker for setting up a consistent development environment:
|
|
||||||
|
|
||||||
1. **Install Docker**
|
### Step 1: Install Docker
|
||||||
If you don't have Docker installed, use these links to install Docker for your system:
|
|
||||||
- [Install Docker Engine](https://docs.docker.com/engine/install/)
|
|
||||||
|
|
||||||
2. **Nvidia Container Toolkit (For GPU support)**
|
If you don't have Docker installed, follow the links below to install Docker for your system:
|
||||||
If you want to utilize GPU acceleration with CUDA, install the Nvidia Container Toolkit:
|
- [Install Docker Engine](https://docs.docker.com/engine/install/)
|
||||||
- [Nvidia Container Toolkit Installation Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
|
|
||||||
|
|
||||||
3. **Build the Docker Image**
|
### Step 2: Install Nvidia Container Toolkit (Optional)
|
||||||
Navigate to the directory containing the Dockerfile and run:
|
If you plan to use GPU acceleration with CUDA, install Nvidia Container Toolkit:
|
||||||
```bash
|
|
||||||
docker build -t aladdin-image .
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Run the Docker Container**
|
- [Nvidia Container Toolkit Installation Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)
|
||||||
Once the image is built, start the container using the following command:
|
|
||||||
```bash
|
### Step 3: Build the Docker Image
|
||||||
docker run -it \
|
Navigate to the directory containing the Dockerfile and build the Docker image with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -t aladdin-image .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Step 4: Run the Docker Container in Detached Mode
|
||||||
|
Run the following command to start the container in detached mode:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d \
|
||||||
--gpus all \
|
--gpus all \
|
||||||
-v "${PWD}:/code" \
|
-v "${PWD}:/code" \
|
||||||
-p 8080:8080 \
|
-p 8080:8080 \
|
||||||
--name "aladdin-container" \
|
--name "aladdin-container" \
|
||||||
--env AUTHENTICATE_VIA_JUPYTER="mytoken" \
|
--env AUTHENTICATE_VIA_JUPYTER="mytoken" \
|
||||||
aladdin-image
|
aladdin-image \
|
||||||
```
|
tail -f /dev/null
|
||||||
|
```
|
||||||
|
|
||||||
|
This will start a new Docker container named `aladdin-container` that will not exit immediately. The `-d` flag runs the container in detached mode, letting it run in the background.
|
||||||
|
|
||||||
|
### Step 5: Interact with the Docker Container
|
||||||
|
To attach an interactive shell to the running container, use the command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker exec -it aladdin-container /bin/bash
|
||||||
|
```
|
||||||
|
|
||||||
|
You can now interact with your container using the bash shell.
|
||||||
|
|
||||||
|
### Additional Notes
|
||||||
|
- If you wish to stop the container, you can do so with `docker stop aladdin-container`.
|
||||||
|
- To start the container again after stopping, use `docker start aladdin-container`.
|
||||||
|
- In case you need to remove the container, make sure it's stopped and then run `docker rm aladdin-container`.
|
||||||
|
- To see the output from the container (logs), use `docker logs aladdin-container`.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# requirements.txt file with basic libraries to install for a machine learning workflow
|
||||||
|
|
||||||
numpy
|
numpy
|
||||||
pandas
|
pandas
|
||||||
scikit-learn
|
scikit-learn
|
||||||
@@ -5,24 +7,35 @@ matplotlib
|
|||||||
seaborn
|
seaborn
|
||||||
scipy
|
scipy
|
||||||
|
|
||||||
# Deep Learning
|
# deep learning
|
||||||
torchvision
|
torchvision
|
||||||
torchaudio
|
torchaudio
|
||||||
transformers
|
transformers
|
||||||
tensorboard
|
lightning
|
||||||
|
|
||||||
# For gradient boosting machines (GBMs)
|
# all you need is xgboost
|
||||||
xgboost
|
xgboost
|
||||||
lightgbm
|
lightgbm
|
||||||
|
|
||||||
# For working with text data
|
# nlp libraries
|
||||||
nltk
|
nltk
|
||||||
spacy
|
spacy
|
||||||
|
|
||||||
# For image processing tasks
|
# image processing
|
||||||
opencv-python-headless
|
opencv-python-headless
|
||||||
Pillow
|
Pillow
|
||||||
|
|
||||||
# Jupyter Notebook (remove if you do not use it within the container)
|
# data loading
|
||||||
|
pyarrow
|
||||||
|
|
||||||
|
# model optimization/experiment tracking
|
||||||
|
tensorboard
|
||||||
|
wandb
|
||||||
|
mlflow
|
||||||
|
|
||||||
|
# utilities
|
||||||
|
tqdm
|
||||||
|
|
||||||
|
# notebooks
|
||||||
jupyter
|
jupyter
|
||||||
ipywidgets
|
ipywidgets
|
||||||
Reference in New Issue
Block a user