from notebook.auth import passwd   

 

해당 모듈  import  시 설치가 되어 있지 않다고  나올 경우

(base) root@jupyterlab-deployment-96d5cd489-kjrd4:~# jupyter notebook --generate-config
Writing default config to: /home/jovyan/.jupyter/jupyter_notebook_config.py

 

 

!pip3 install notebook==6.5.5

 

이렇게 해서 해결이 안되면

 

!pip3 install --upgrade ipython 

요렇게 도 해본다

 

다시

from notebook.auth import passwd    

 

# 아래 전체가 암호이다

'argon2:$argon2id$v=19$m=10240,t=10,p=8$QbPT9aYvhdqRFecguJX5sg$ArunzaJ65DCEA6MnCL7N9Y2m0Y1XwVCR3N95PC3lGxE'

 

 

(base) root@jupyterlab-deployment-96d5cd489-kjrd4:~/.jupyter# vi jupyter_notebook_config.py

 

 없으면 추가

 

c.ServerApp.password_required = True
c.PasswordIdentityProvider.hashed_password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$QbPT9aYvhdqRFecguJX5sg$ArunzaJ65DCEA6MnCL7N9Y2m0Y1XwVCR3N95PC3lGxE'

 

 

deply.yaml 에서 

           chmod -R 777 /home/jovyan/work
              start.sh jupyter lab --LabApp.token='password' --LabApp.ip='0.0.0.0' --LabApp.allow_root=True


        해당 부분을   

start.sh jupyter lab --LabApp.token='' --LabApp.password='' 

 

이렇게 변경

해당 부분을

 

 

 

jupyter-deploy.txt
0.00MB

 

 

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jupyterlab-deployment
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jupyterlab
  template:
    metadata:
      labels:
        app: jupyterlab
    spec:
      securityContext:
        runAsUser: 0
        fsGroup: 0
      containers:
        - name: jupyterlab
          image: jupyter/datascience-notebook:latest
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 8888
          command:
            - /bin/bash
            - -c
            - |
              chmod -R 777 /home/jovyan/work
              start.sh jupyter lab --LabApp.token='' --LabApp.password='' --LabApp.ip='0.0.0.0' --LabApp.allow_root=True
              #start.sh jupyter lab --LabApp.token='password' --LabApp.ip='0.0.0.0' --LabApp.allow_root=True
          volumeMounts:
            - name: jupyterlab-data
              mountPath: /home/jovyan/work
              #mountPath: /data
            - name: jupyterlab-config
              mountPath: /home/jovyan/.jupyter
          securityContext:
              runAsUser: 0
          resources:
            requests:
              memory: 500Mi
              cpu: 250m
      restartPolicy: Always
      volumes:
      - name: jupyterlab-data
        #persistentVolumeClaim:
        #claimName: fileshare-pvc
        hostPath:
           path: /home/sysic/Data
      - name: jupyterlab-config
        hostPath:
           path: /home/sysic/config

 

################### 홈 디렉토리 변경하기 #########################################

 

(base) root@jupyterlab-deployment-6886db8858-rf68k:~/.jupyter# pwd
/home/jovyan/.jupyter
(base) root@jupyterlab-deployment-6886db8858-rf68k:~/.jupyter# more jupyter_notebook_config.py |grep jaeyon
c.ServerApp.root_dir = '/home/jaeyong'
(base) root@jupyterlab-deployment-6886db8858-rf68k:~/.jupyter#



apiVersion: apps/v1
kind: Deployment
metadata:
  name: jupyterlab-deployment
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jupyterlab
  template:
    metadata:
      labels:
        app: jupyterlab
    spec:
      securityContext:
        runAsUser: 0
        fsGroup: 0
      containers:
        - name: jupyterlab
          image: jupyter/datascience-notebook:latest
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 8888
          command:
            - /bin/bash
            - -c
            - |
              chmod -R 777 /home/jaeyong
              #chmod -R 777 /home/jovyan/work
              start.sh jupyter lab --LabApp.token='' --LabApp.password='' --LabApp.ip='0.0.0.0' --LabApp.allow_root=True
              #start.sh jupyter lab --LabApp.token='password' --LabApp.ip='0.0.0.0' --LabApp.allow_root=True
          volumeMounts:
            - name: jupyterlab-data
              mountPath: /home/jaeyong
              #mountPath: /home/jovyan/work
              #mountPath: /data
            - name: jupyterlab-config
              mountPath: /home/jovyan/.jupyter
          securityContext:
              runAsUser: 0
          resources:
            requests:
              memory: 500Mi
              cpu: 250m
      restartPolicy: Always
      volumes:
      - name: jupyterlab-data
        #persistentVolumeClaim:
        #claimName: fileshare-pvc
        hostPath:
           path: /home/sysic/Data
      - name: jupyterlab-config
        hostPath:
           path: /home/sysic/config

 

 

'일상다반사 > 이런저런 생각들' 카테고리의 다른 글

2024-05 삶이 지칠 때  (1) 2024.05.07
배우는 사람  (0) 2023.05.10
힘들때 읽자! 듣자!  (0) 2023.04.03
금주  (0) 2021.07.17
우물안 개구리  (0) 2021.07.14

 

 

 

 

*

application/octet-stream

 

'나는 노동자 > 이런저런 Tip' 카테고리의 다른 글

iPhone 강제로 재시동하기  (0) 2023.11.03
ntp offset 추출 - ansible  (0) 2023.07.23
미드저니 기본 명령어  (0) 2023.05.13
windows os hostname s/n ip  (0) 2023.03.20
grafana plugin 수동설치  (0) 2023.03.03

+ Recent posts