Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
# DECS
Dongguk Education(Elastic이 λ˜κ²Œλ” k8s λ„μž… μ˜ˆμ •) Containter Service μž…λ‹ˆλ‹€..
## πŸ—’οΈ 이미지 버전 μš”μ•½
각 이미지 νƒœκ·ΈλŠ” μƒμ„±λœ λ‚ μ§œ(YYMMDD)λ₯Ό λ”°λ₯΄λ©°, latest νƒœκ·ΈλŠ” 항상 μ΅œμ‹  λ²„μ „μ˜ 이미지λ₯Ό κ°€λ¦¬ν‚΅λ‹ˆλ‹€.

| 이미지 νƒœκ·Έ (Image Tag) | TensorFlow 버전 | CUDA / cuDNN | 베이슀 OS (Base OS) | μ£Όμš” 변경사항 및 μ„€λͺ… |
| :--- | :--- | :--- | :--- | :--- |
| `dguailab/decs:latest`<br>`dguailab/decs:251002` | **2.18.0** | CUDA 12.5<br>cuDNN 8.9 | Ubuntu 22.04 | **(μ΅œμ‹ )** TensorFlow 2.18.0 μ—…κ·Έλ ˆμ΄λ“œ, μ΅œμ‹  GPU ν™˜κ²½ 지원 |
| `dguailab/decs:250926` | **2.13.0** | CUDA 11.8<br>cuDNN 8.6 | Ubuntu 20.04 | **(이전 μ•ˆμ • 버전)** TensorFlow 2.13.0 기반의 μ•ˆμ •ν™” 버전 |

## βš™οΈ μ‚¬μš© 방법
ν•„μš”ν•œ λ²„μ „μ˜ 이미지λ₯Ό Docker Hubμ—μ„œ pull λ°›μ•„ μ‚¬μš©ν•©λ‹ˆλ‹€.

### μ΅œμ‹  버전 μ‚¬μš©ν•˜κΈ°
latest νƒœκ·Έλ₯Ό μ‚¬μš©ν•˜μ—¬ 항상 μ΅œμ‹  λ²„μ „μ˜ 이미지λ₯Ό 받을 수 μžˆμŠ΅λ‹ˆλ‹€.
```
docker pull dguailab/decs:latest
```

### λ‚ μ§œ νƒœκ·Έλ₯Ό 직접 λͺ…μ‹œν•˜μ—¬ λ°›κΈ°
```
docker pull dguailab/decs:251002
```

### νŠΉμ • ꡬ버전 μ‚¬μš©ν•˜κΈ°
이전 λ²„μ „μ˜ TensorFlow ν™˜κ²½μ΄ ν•„μš”ν•œ 경우, ν•΄λ‹Ή λ‚ μ§œ νƒœκ·Έλ₯Ό λͺ…μ‹œν•˜μ—¬ 이미지λ₯Ό λ°›μŠ΅λ‹ˆλ‹€.
```
docker pull dguailab/decs:250926
```


# βš’οΈ λΉŒλ“œ μžλ™ν™”
이 Docker μ΄λ―Έμ§€λŠ” GitHub Actionsλ₯Ό 톡해 μžλ™μœΌλ‘œ λΉŒλ“œ 및 λ°°ν¬λ©λ‹ˆλ‹€.
- μ‹€ν–‰ 쑰건: decsYYMMDD ν˜•μ‹μ˜ λΈŒλžœμΉ˜κ°€ develop 브랜치둜 병합(merge)될 λ•Œ
- μžλ™ 생성 νƒœκ·Έ:
- 브랜치 μ΄λ¦„μ—μ„œ μΆ”μΆœν•œ λ‚ μ§œ νƒœκ·Έ (예: `dguailab/decs:251002`)
- μ΅œμ‹  버전을 κ°€λ¦¬ν‚€λŠ” latest νƒœκ·Έ (`dguailab/decs:latest`)


<br><br><br>
### πŸ”— κ΄€λ¦¬μžμš© λ…Έμ…˜ λ¬Έμ„œ 링크
https://www.notion.so/DECS-280c7692a263802ca40ff68b38f58dd1?source=copy_link
25 changes: 21 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,33 @@ service ssh restart

# jupyter lab μ—μ„œ μƒμ„±ν•œ ipynb νŒŒμΌμ„ μ €μž₯ν•  디렉토리 생성 (μ—†λŠ”κ²½μš°λ§Œ μ‹ κ·œ 생성)
if [ ! -d "/home/$USER_ID/decs_jupyter_lab" ]; then
mkdir /home/$USER_ID/decs_jupyter_lab
echo "Created /home/$USER_ID/decs_jupyter_lab dir...."
mkdir /home/$USER_ID/decs_jupyter_lab
echo "Created /home/$USER_ID/decs_jupyter_lab dir...."
fi

# jupyter lab config 파일이 μ—†μœΌλ©΄ 생성
mkdir -p /home/$USER_ID/.jupyter/

if [ ! -f /home/$USER_ID/.jupyter/jupyter_notebook_config.py ]; then
echo "jupyter_notebook_config.py not found, generating..."
/opt/anaconda3/bin/jupyter notebook --generate-config
cp /root/.jupyter/jupyter_notebook_config.py /home/$USER_ID/.jupyter/
else
echo "jupyter_notebook_config.py already exists."
fi

# jupyter lab 접속 μ„€μ •
sed -i "1i c.JupyterApp.config_file_name = 'jupyter_notebook_config.py'\nc.NotebookApp.allow_origin = '*'\nc.NotebookApp.ip = '0.0.0.0'\nc.NotebookApp.open_browser = False\nc.NotebookApp.allow_remote_access = True\nc.NotebookApp.allow_root = True\nc.NotebookApp.notebook_dir='/home/$USER_ID/decs_jupyter_lab'" /jupyter_config/jupyter_notebook_config.py
sed -i "1i c.JupyterApp.config_file_name = 'jupyter_notebook_config.py'\nc.NotebookApp.allow_origin = '*'\nc.NotebookApp.ip = '0.0.0.0'\nc.NotebookApp.open_browser = False\nc.NotebookApp.allow_remote_access = True\nc.NotebookApp.allow_root = True\nc.NotebookApp.notebook_dir='/home/$USER_ID/decs_jupyter_lab'" /home/$USER_ID/.jupyter/jupyter_notebook_config.py

# Jupyter Lab 토큰을 랜덀 λ¬Έμžμ—΄λ‘œ μƒμ„±ν•˜κ³  μ €μž₯
TOKEN=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 10)
echo "$TOKEN" > /home/$USER_ID/decs_jupyter_lab/jupyter_token.txt
chmod 600 /home/$USER_ID/decs_jupyter_lab/jupyter_token.txt
chown $USER_ID:$USER_ID /home/$USER_ID/decs_jupyter_lab/jupyter_token.txt

# jupyter_lab 기동
echo "trying jupyter lab..."
nohup /opt/anaconda3/bin/jupyter lab --NotebookApp.token=decs --config=/jupyter_config/jupyter_notebook_config.py >/dev/null 2>&1 &
nohup /opt/anaconda3/bin/jupyter lab --NotebookApp.token=$TOKEN --config=/home/$USER_ID/.jupyter/jupyter_notebook_config.py >/dev/null 2>&1 &
echo "jupyter lab listening!"

# ldconfig permission 였λ₯˜ λ°©μ§€
Expand Down