본문 바로가기

Workshop Index

Software & Installation

INSTALLATION

Instructor : NJ Namju Lee / nj.namju@gmail.com

* Lab - https://namjulee.github.io/njs-lab-public/nj-namju-lee
* Linkedin - https://www.linkedin.com/in/nj-namju-lee-926b3252/ * Git - https://github.com/NamjuLee
* Video(English) - https://www.youtube.com/c/njnamjulee * Writing(English) - https://medium.com/@nj-namju
* Video(Korean) - https://www.youtube.com/c/CodeforDesign * Writing(Korean) - https://brunch.co.kr/@njnamju

1. DESIGN SOFTWARE


2. IDE & Git


3. Node env

node -v
npm -v
npm install -g yarn

4. CUDA for Windows

• nvidia-smi
• https://developer.nvidia.com/cuda-toolkit-archive

5. Miniconda env

• Miniconda - https://docs.anaconda.com/miniconda/
• Repo - https://repo.anaconda.com/miniconda/
• Edit the system environment variables - 
    ○ C:\Users\namju\miniconda3
    ○ C:\Users\namju\miniconda3\Scripts
    ○ C:\Users\namju\miniconda3\condabin

• conda create -n myEnv python=3.9
• conda remove --name myEnv --all
• conda activate myEnv

6. Python Packages

Tensorflow

Case 1

conda create -n tf-gpu-2024 python=3.8
conda activate tf-gpu-2024
nvidia-smi
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1
conda install tensorflow-gpu OR
pip install tensorflow-gpu==2.5.0

Case 2

conda create -n tf-gpu-2024 python=3.8
conda activate tf-gpu-2024
conda install -c conda-forge tensorflow-gpu=2.6.0 cudnn=8.2 cudatoolkit=11.2
conda install numpy=1.21
# M2 TF
conda create -n tf-metal-2024 
conda activate tf-metal-2024 

conda install -c apple tensorflow-deps

pip install tensorflow-macos
pip install tensorflow-metal

pip install numpy --upgrade
pip install pandas --upgrade
pip install matplotlib --upgrade
pip install scikit-learn --upgrade
pip install scipy --upgrade
pip install plotly --upgrade

Opencv m1
https://www.geeksforgeeks.org/how-to-install-opencv-4-on-macos/

conda install -c anaconda seaborn
  • Testing
    Import tensorflow as tf
    print("TensorFlow version:", tf.__version__)
    print("Is GPU available:", tf.config.list_physical_devices('GPU'))
    TensorFlow version: 2.5.0 Is GPU available: [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

Pytorch

conda install pytorch==2.5.0 torchvision==0.20.0 torchaudio==2.5.0 pytorch-cuda=11.8 -c pytorch -c nvidia




* For OSX
  * https://towardsdatascience.com/installing-pytorch-on-apple-m1-chip-with-gpu-acceleration-3351dc44d67c

```shell
# M2 Torch
$ conda create -n torch-2023 python=3.9
$ conda activate torch

conda install pytorch torchvision torchaudio -c pytorch-nightly
  • Testing
    import torch
    print(torch.__version__)
    print(torch.cuda.is_available())
    

2.5.0
True



### Common Libs
```shell
conda install -c anaconda pillow
conda install -c anaconda pandas
conda install -c anaconda seaborn

conda install -c anaconda matplotlib
conda install -c conda-forge matplotlib
pip install matplotlib

conda install -c anaconda opencv
conda install -c conda-forge opencv
pip install opencv-python

conda install -c anaconda scikit-learn
conda install -c conda-forge scikit-image
pip install tqdm

6. Starter