C.W.K.
Stream
Lesson 07 of 07 · published

TF 2.21 설치 — CPU, NVIDIA GPU, Apple Silicon, Docker

~12 min · install, gpu, cuda, metal

Level 0Level 0
0 XP0/78 lessons0/17 achievements
0/100 XP to next level100 XP to go0% complete

환경 한 번 제대로 잡고 그만 싸우자

Stack Overflow의 TF 질문 절반은 설치 이슈야. 이유: TF가 CUDA, cuDNN, Metal, Python ABI 버전과 플랫폼마다 다르게 엮여서. 한 번 깔끔하게 깔아두면 몇 시간 아껴.

TF 2.21.0 기준 (2026년 3월): 최소 Python 3.10, TensorBoard 별도 설치, GPU 휠은 CUDA 12.3 + cuDNN 8.9.7 번들.

Windows native + GPU는 끝났어. 네이티브 Windows GPU 지원은 TF 2.10이 마지막. TF 2.11+ NVIDIA GPU on Windows는 WSL2 안에서 Linux 안내 따라 설치해. Windows native + TF 2.21 = CPU only.

Code

CPU install — any platform·bash
python3 -m venv venv-tf
source venv-tf/bin/activate     # Windows: venv-tf\Scripts\activate
pip install --upgrade pip
pip install tensorflow
python -c "import tensorflow as tf; print(tf.__version__)"
Linux / WSL2 with NVIDIA GPU·bash
pip install 'tensorflow[and-cuda]'
# Bundles CUDA 12.3 + cuDNN 8.9.7 with the wheel.
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
Apple Silicon (M1/M2/M3/M4) — Metal backend·bash
python3 -m venv venv-metal
source venv-metal/bin/activate
pip install --upgrade pip
pip install tensorflow tensorflow-metal
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
# Expect: [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Docker — works everywhere·bash
docker pull tensorflow/tensorflow:latest
docker run -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter

# Linux + NVIDIA GPU
docker run --gpus all -it tensorflow/tensorflow:latest-gpu

# TF 2.21+에선 TensorBoard 따로 설치 잊지 말기
pip install tensorboard

External links

Exercise

하드웨어에 맞는 경로로 TF 2.21 설치. tf.config.list_physical_devices() 돌려서 device list 맞는지 확인. NVIDIA GPU 있는데 CPU만 보이면 가장 흔한 설치 버그 — 다음 track 시작 전에 지금 진단해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.