Я использую Zero-to-jupyterhub-k8s в Google Kubernetes Engine, и я не могу подключить корзину облачного хранилища Google к однопользовательским модулям. Я использую GCSFuse. Не удалось запустить контейнер с сообщением ниже:
Error: failed to start container "notebook": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"jupyterhub-singleuser\": executable file not found in $PATH": unknown
Мой DockerFile использует K8s-singleuser-sample и устанавливает GCSFuse:
FROM jupyterhub/k8s-singleuser-sample:0.9.1
FROM python:3
ENV GCSFUSE_REPO gcsfuse-stretch
# Add google repositories for gcsfuse and google cloud sdk
RUN apt-get update -y && apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl
RUN echo "deb http://packages.cloud.google.com/apt $GCSFUSE_REPO main" | tee /etc/apt/sources.list.d/gcsfuse.list
RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
# Install gcsfuse and google cloud sdk
RUN apt-get update -y && apt-get install -y gcsfuse google-cloud-sdk \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# make directory for mounting
RUN mkdir -p /shared-data
RUN pip install --upgrade pip
RUN pip install fasttext
RUN pip install ax-platform
Это мой config.yaml:
hub:
baseUrl: /jupyterhub
extraConfig: |
from kubernetes import client
def modify_pod_hook(spawner, pod):
pod.spec.containers[0].security_context = client.V1SecurityContext(
privileged=True,
capabilities=client.V1Capabilities(
add=['SYS_ADMIN']
)
)
return pod
c.KubeSpawner.modify_pod_hook = modify_pod_hook
proxy:
secretToken: "some-token-here"
service:
type: NodePort
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hosts:
- my-host-name
tls:
- hosts:
- my-host-name
secretName: jhub-tls
auth:
admin:
users:
- admin
type: dummy
dummy:
password: 'myPassword'
whitelist:
users:
- user1
- user2
singleuser:
storage:
type: none
extraVolumes:
- name: jhub-secret
secret:
secretName: jhub-dev-secret
extraVolumeMounts:
- name: jhub-secret
mountPath: /secrets/key
extraEnv:
GCS_BUCKET: my-bucket
GCS_BUCKET_FOLDER: /shared-data
GOOGLE_APPLICATIONS_CREDENTIALS: /secrets/key/XYZ.json
lifecycleHooks:
postStart:
exec:
command:
- 'sh'
- '-c'
- "gcsfuse -o nonempty --key-file=${GOOGLE_APPLICATIONS_CREDENTIALS} ${GCS_BUCKET} ${GCS_BUCKET_FOLDER}"
preStop:
exec:
command: ["fusermount", "-u", "/shared-data"]
image:
name: gcr.io/myproject/base-images/jhub-k8s-cust-singleuser
tag: 1.1.1
pullPolicy: Always
Кто-нибудь, пожалуйста, сообщите мне, в чем может быть возможная причина этой проблемы?