개요
백그라운드에서 nbconvert 라이브러리를 사용하여 ipynb 파일을 풀로 실행시키는 방법을 안내합니다. 꽤 단순합니다.
nbconvert 설치
환경에 맞게 nbconvert 를 설치합니다. 저는 conda 환경에서 개발하고 있으므로 아래 명령어를 사용하여 설치했습니다.
conda install nbconvert
실행
끝까지 실행하고자 하는 노트북 파일 이름이 mymain.ipynb라고 가정합니다. 아래 명령어를 실행해 보세요.
nohup jupyter nbconvert --to notebook --execute mymain.ipynb &
위 명령어를 통해 mymain 노트북 파일을 처음부터 끝까지 실행시키며 실행 결과는 mymain.nbconvert.ipynb 파일로 추가 생성/저장됩니다.
참고 자료
- https://nbconvert.readthedocs.io/en/latest/usage.html#notebook-and-preprocessors
- https://hanarotg.tistory.com/305
'소프트웨어 & 클라우드' 카테고리의 다른 글
[ChromeOS] 노트북에 Chrome OS 설치하기 (0) | 2025.05.05 |
---|---|
[Ubuntu 22.04] 키보드 백라이트 광량 조절하기 (0) | 2025.04.19 |
[Git] github repository 이전 버전으로 바꾸고 업로드하기 (0) | 2025.02.26 |
[Jupyter] Windows WSL2 에서 Jupyter Lab 원격 접속 세팅하기 (0) | 2025.02.10 |
[Anaconda] tensorflow GPU 환경 설치 및 전환 명령어 (0) | 2025.01.17 |