--- tags: computer science --- # Developers' Guide to Environment Setup ## Compute Unified Device Architecture (CUDA) ### Ubuntu 22.04 | GPU Model | VRAM | Installation Result | | -------------- | ----- | ---------------------- | | RTX 4090 | 24 GB | OK | | GTX 1080 Ti | 11 GB | OK | | RTX 2070 Super | 8 GB | OK | | Tesla P40 | 24 GB | NG with overheat issue | ```bash= sudo apt-get remove --purge '^nvidia-.*' sudo apt-get autoremove sudo apt-get install nvidia-driver-535 -y cd /dev/shm/ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb sudo dpkg -i cuda-keyring_1.1-1_all.deb sudo apt-get update sudo apt-get -y install cuda-toolkit-12-2 sudo dpkg -i cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb sudo cp /var/cudnn-local-repo-*/cudnn-local-*-keyring.gpg /usr/share/keyrings/ sudo apt-get update sudo apt-get install libcudnn8=8.9.7.29-1+cuda12.2 ``` - Benchmark for CNN models | GPU Model | Time | Speedup | | -------------- | ---- | ------- | | RTX 4090 | TBA | TBA | | Tesla P40 | TBA | TBA | | RTX 2070 Super | TBA | TBA | ### Windows 10 | GPU Model | VRAM | Result | | ------------ | ---- | ------ | | RTX 2060 | 6 GB | TBA | | Quadro K2200 | 4 GB | TBA | - Update NVIDIA GPU driver: https://www.nvidia.com.tw/Download/index.aspx - Install CUDA Toolkit: https://developer.nvidia.com/cuda-downloads - Install cuDNN packages: https://developer.nvidia.com/rdp/cudnn-archive - Install Tensorflow ```bash= pip3 install tensorflow ``` ## Java - Oracle JDK on all platforms, including __Windows x64__ / __Linux (Debian/Ubuntu)__ / __MacOS__ ![](https://i.imgur.com/XvFnUjq.png) - Lastest version https://www.oracle.com/java/technologies/downloads/ - Previous Long-Term Support (LTS) versions could be found below: - JDK17 https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html - JDK11 https://www.oracle.com/java/technologies/javase-jdk11-downloads.html - JDK8 https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html <br> :::danger For Eclipse users, uncheck the button **"Create module-info.java file"** when you are creating a new Java project. You can delete the file "module-info.java" if it appears in the project. ::: :::info For your information, JDK8 is the most popular version of JDKs; you may need JDK17 (at least) when the IDE installation asks you to do so. ::: - Popular IDEs are listed below: - Eclipse https://www.eclipse.org/ ![](https://i.imgur.com/dMm8fMm.png =200x) - IntelliJ IDEA https://www.jetbrains.com/idea/ ![](https://i.imgur.com/bYjc0Yc.png =200x) <br> :::warning The ultimate version is not free but offering you more useful automation tools when you are working with the Spring framework or so on. ::: - Visual Studio Code https://code.visualstudio.com/ ![](https://i.imgur.com/YLWWez0.png) - NetBeans https://netbeans.org/ ![](https://i.imgur.com/3nGKeiX.png =200x) - BlueJ https://www.bluej.org/ ![](https://i.imgur.com/zise4CD.png =100x) ### Spring Boot ```bash= curl -s https://get.sdkman.io | bash source "$HOME/.sdkman/bin/sdkman-init.sh" sdk install springboot spring --version ``` ## C & C++ - GNU C++ on __Linux (Debian/Ubuntu)__ - https://gcc.gnu.org/ ```bash sudo apt install build-essentials ``` - Visual Studio with C++ on __Windows x64__ - https://visualstudio.microsoft.com/ ![](https://i.imgur.com/UXHJYdx.png) - Visual Studio Code with C++ on __Windows x64__ - Visual Studio Code https://code.visualstudio.com/ ![](https://i.imgur.com/YLWWez0.png) - C/C++ for Visual Studio Code https://code.visualstudio.com/docs/languages/cpp - https://code.visualstudio.com/docs/languages/cpp#_example-install-mingwx64 - You need to install one of C++ compilers say, [MinGW](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download), which is a native Windows port of the GNU Compiler Collection (GCC). - Also see https://zh.wikipedia.org/zh-tw/MinGW. - Install clang on __MacOS__ - https://clang.llvm.org/get_started.html - You may consider to use [Xcode](https://developer.apple.com/xcode/). ![](https://i.imgur.com/Yun3pWE.png =100x) ## .NET Core with C# - Visual Studio with .NET Core/Framework on __Windows x64__ and __Mac OS__ - https://visualstudio.microsoft.com/ ![](https://i.imgur.com/UXHJYdx.png) - Visual Studio Code with .NET Core/Framework on __Linux (Debian / Ubuntu)__ - https://code.visualstudio.com/ ![](https://i.imgur.com/YLWWez0.png) - Installation - Linux: https://tecadmin.net/how-to-install-net-core-on-ubuntu-20-04/ ```bash wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb sudo apt update sudo apt install apt-transport-https sudo apt install dotnet-sdk-<version> # test dotnet new console -o HelloWorld ``` - https://docs.microsoft.com/zh-tw/dotnet/core/install/linux ## Python - Official download https://www.python.org/downloads/ ![](https://i.imgur.com/5DNUBG7.png =150x) - Google Colab https://colab.research.google.com/ ![](https://i.imgur.com/MZAP2Jq.png ) - Anaconda on __Windows x64__ / __Linux (Debian/Ubuntu)__ https://www.anaconda.com/products/individual ![](https://i.imgur.com/gCEp316.png =200x) - Visual Studio Code with Python, including __Windows x64__ / __Linux (Debian / Ubuntu)__ / __MacOS__ https://code.visualstudio.com/docs/python/python-tutorial ![](https://i.imgur.com/YLWWez0.png) ## Kotlin - Official website: https://kotlinlang.org/ ![](https://i.imgur.com/5nLn4p3.png) - https://kotlinlang.org/docs/getting-started.html - Installation - Linux: https://linuxhint.com/kotlin_ubuntu/ ```bash sudo apt install snap sudo snap install --classic kotlin # assume hello.kt kotlinc hello.kt -include-runtime -d hello.jar java -jar hello.jar # you can run kt program directly after compilation kotlinc hello.kt kotlin HelloKt ``` ## Rust - Official website: https://www.rust-lang.org/ ![](https://i.imgur.com/3ESXmYc.png) - Quick start: https://doc.rust-lang.org/rust-by-example/ - Installation - Linux ```bash sudo apt install curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` ## Go - Official website: https://golang.org/ ![](https://i.imgur.com/SjlTYLQ.png) - Installation: - Linux ```bash sudo apt install snap sudo snap install --classic go ``` - Tutorial by examples: https://gobyexample.com/ ## LaTex - Windows - MikTex: https://miktex.org/ - Strawberry Perl: https://strawberryperl.com/ - Recommended cross-platform editors: - VS Code - Plugins: https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop - Tex Studio: https://www.texstudio.org/ ## Haskell - Official website: https://www.haskell.org/ ## JavaScript ### TypeScript