[D-91] Jupyter 연결 & sssm 2
[D-91] Jupyter 연결 & sssm 2
+++
콘다 환경 :
conda create -n sssm pytorch pytorch-cuda=12.4 uv -c pytorch -c conda-forge -y
얘는 왜 또 쿠다 12.4 를 쓰는지 ..ㅎㅎ
+++
Jupyter 연결
지금까지 계속 코드를 복사 붙여넣기 했는데, 슬럼환경과 쥬피터를 연결 해보려고 한다.
1. 쉘 파일 만들기.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#SBATCH --job-name=conn_jupyter
#SBATCH --output=/storage/athene/work/kim/holi/output.txt
#SBATCH --error=/storage/athene/work/kim/holi/error.txt
#SBATCH --mail-user=***@stud.tu-darmstadt.de
#SBATCH --mail-type=ALL
#SBATCH --gres=gpu:1
#SBATCH --constraint="gpu_mem:80gb"
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=16
#SBATCH --mem=128GB
#SBATCH --partition=gpu-athene
#SBATCH --account=athene-student
#SBATCH --qos=gpu-small
export PYTHONPATH=/storage/athene/work/kim:$PYTHONPATH
module load cuda/12.4
source /storage/athene/work/kim/miniconda3/etc/profile.d/conda.sh
conda activate sssm
export CUDA_HOME=/nfs/cuda/cuda-12.4/
jupyter notebook --ip=0.0.0.0 --port=8188 --notebook-dir=/storage/athene/work/kim/holi
2. error 파일을 연다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$ cat error.txt
[I 2025-11-26 21:47:01.312 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2025-11-26 21:47:01.317 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2025-11-26 21:47:01.322 ServerApp] jupyterlab | extension was successfully linked.
[I 2025-11-26 21:47:01.326 ServerApp] notebook | extension was successfully linked.
/storage/athene/work/kim/miniconda3/envs/sssm/lib/python3.12/site-packages/IPython/paths.py:66: UserWarning: IPython parent '/home/kim' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"
[I 2025-11-26 21:47:02.182 ServerApp] notebook_shim | extension was successfully linked.
[I 2025-11-26 21:47:02.226 ServerApp] notebook_shim | extension was successfully loaded.
[I 2025-11-26 21:47:02.228 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2025-11-26 21:47:02.229 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2025-11-26 21:47:02.240 LabApp] JupyterLab extension loaded from /storage/athene/work/kim/miniconda3/envs/sssm/lib/python3.12/site-packages/jupyterlab
[I 2025-11-26 21:47:02.240 LabApp] JupyterLab application directory is /mnt/gpfs/work/kim/miniconda3/envs/sssm/share/jupyter/lab
[I 2025-11-26 21:47:02.241 LabApp] Extension Manager is 'pypi'.
[I 2025-11-26 21:47:02.330 ServerApp] jupyterlab | extension was successfully loaded.
[I 2025-11-26 21:47:02.334 ServerApp] notebook | extension was successfully loaded.
[I 2025-11-26 21:47:02.335 ServerApp] Serving notebooks from local directory: /storage/athene/work/kim/holi
[I 2025-11-26 21:47:02.335 ServerApp] Jupyter Server 2.17.0 is running at:
[I 2025-11-26 21:47:02.335 ServerApp] http://severus:8188/tree?token=6***
[I 2025-11-26 21:47:02.335 ServerApp] http://127.0.0.1:8188/tree?token=6***
[I 2025-11-26 21:47:02.335 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2025-11-26 21:47:02.344 ServerApp] No web browser found: Error('could not locate runnable browser').
[C 2025-11-26 21:47:02.345 ServerApp]
To access the server, open this file in a browser:
file:///storage/athene/work/kim/.local/share/jupyter/runtime/jpserver-1277192-open.html
Or copy and paste one of these URLs:
http://severus:8188/tree?token=6***
http://127.0.0.1:8188/tree?token=6***
[I 2025-11-26 21:47:02.367 ServerApp] Skipped non-installed server(s): basedpyright, bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyrefly, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
/storage/athene/work/kim/miniconda3/envs/sssm/lib/python3.12/site-packages/IPython/paths.py:66: UserWarning: IPython parent '/home/kim' is not a writable location, using a temp directory.
warn("IPython parent '{0}' is not a writable location,"
!Remark!
1
2
[I 2025-11-26 21:47:02.335 ServerApp] http://severus:8188/tree?token=6***
[I 2025-11-26 21:47:02.335 ServerApp] http://127.0.0.1:8188/tree?token=6***
3. ssh tunnel
다른 쉘을 열어서 아래 커맨드를 넣으면 된다. 8188(포트번호)
1
$ ssh -v -N -L 8188:severus:8188 kim@slurm.ukp.informatik.tu-darmstadt.de
여기서 슬럼 패스워드를 물어보는데 입력해주고 http://127.0.0.1:8188/tree?token=… 열면 됨!
근데 맨처음에 쉘파일에서 마지막 라인
jupyter notebook –ip=0.0.0.0 –port=8188 –notebook-dir=/storage/athene/work/kim/holi
때문에 /…/holi 하위 폴더로 열림ㅎㅎ. 다음에 열때는 어느 하위 폴더로 열고 싶은지 잘 지정해볼 수 있도록..!
SSSM Installation
sssm installation 진행중인데
1
2
3
module load gcc-toolset/13 # This is Della-specific; make sure you have a valid C/C++ compiler
pip install git+https://github.com/HazyResearch/flash-fft-conv.git#subdirectory=csrc/flashfftconv
pip install git+https://github.com/HazyResearch/flash-fft-conv.git
에서 맨아래 커맨드 빼고 다 안됨.
왜 ModuleNotFoundError: No module named ‘torch’
This post is licensed under CC BY 4.0 by the author.