У меня есть старый сервер IBM Power8, который я пытаюсь продолжить jupyterhub. Там нет предварительно построенных изображений Docker, поэтому я должен сделать свои собственные. Однако, когда я захожу ввести свое имя пользователя и пароль, оно никогда не работает. Нет информации в журналах, кроме уведомлений о неудачных попытках.wget https://github.com/tbrown122387/jhub_po ... df77a9.zip
unzip 45219232bc4681038942763e825a071e43df77a9.zip -d ./
cd jhub_powerpc-45219232bc4681038942763e825a071e43df77a9/
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
docker build -t my-jupyter-ppc64le .
docker run -d -p 443:443 --name jhub my-jupyter-ppc64le
Вот полный dockerfile ниже. Пользователь Taylor является пользователем на сервере за пределами контейнера Docker.
# Use a base image that supports ppc64le architecture
FROM ubuntu:20.04
# Set timezone
ENV TZ=America/New_York
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y tzdata
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
curl \
ca-certificates \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install NVM
ENV NVM_DIR=/root/.nvm
RUN curl -fsSL https://raw.githubusercontent.com/nvm-s ... install.sh | bash
# Install Node.js and npm using NVM
RUN bash -c "source $NVM_DIR/nvm.sh && nvm install 18 && nvm use 18 && nvm alias default 18"
# Set Node.js and npm in the PATH
ENV PATH="/root/.nvm/versions/node/v18.20.7/bin:$PATH"
# Verify Node.js and npm installation
RUN bash -c "source $NVM_DIR/nvm.sh && node -v && npm -v"
# Install yarn and configurable-http-proxy globally
RUN bash -c "source $NVM_DIR/nvm.sh && npm install -g yarn configurable-http-proxy"
# Ensure configurable-http-proxy is available globally
RUN echo "export PATH=\$PATH:/root/.nvm/versions/node/v18.20.7/bin" >> /root/.bashrc
# Download and install Miniconda
RUN wget -q https://repo.anaconda.com/miniconda/Min ... ppc64le.sh && \
chmod +x Miniconda3-latest-Linux-ppc64le.sh && \
./Miniconda3-latest-Linux-ppc64le.sh -b && \
rm Miniconda3-latest-Linux-ppc64le.sh
# Add Miniconda to PATH
ENV PATH="/root/miniconda3/bin:$PATH"
# Ensure conda is available
RUN conda --version
# Install mamba using conda
RUN conda install mamba -c conda-forge -y
# Install JupyterHub and dependencies using mamba
RUN mamba install --yes jupyterhub-singleuser jupyterlab nbclassic "notebook>=7.2.2" jupyterhub[localauth]
# Create SSL directory
RUN mkdir -p /etc/jupyterhub/ssl
# Copy SSL certificate and key (Make sure you have these files before building)
COPY cert.pem /etc/jupyterhub/ssl/cert.pem
COPY key.pem /etc/jupyterhub/ssl/key.pem
# Set correct permissions for SSL files
RUN chmod 600 /etc/jupyterhub/ssl/cert.pem /etc/jupyterhub/ssl/key.pem
# Create JupyterHub config directory
RUN mkdir -p /etc/jupyterhub
# Generate JupyterHub server configuration with LocalAuthenticator
# NB: change "taylor" to your system username you're using outside of Docker
RUN echo "c.Authenticator.admin_users = {'taylor'}" > /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.authenticator_class = 'jupyterhub.auth.LocalAuthenticator'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.LocalAuthenticator.create_system_users = True" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ip = '0.0.0.0'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.port = 443" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ssl_cert = '/etc/jupyterhub/ssl/cert.pem'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ssl_key = '/etc/jupyterhub/ssl/key.pem'" >> /etc/jupyterhub/jupyterhub_config.py
# Expose SSL port
EXPOSE 443
# Ensure that the configurable-http-proxy path is set during JupyterHub startup
ENV PATH="/root/.nvm/versions/node/v18.20.7/bin:$PATH"
# Default command to start JupyterHub with SSL
CMD ["bash", "-c", "source $NVM_DIR/nvm.sh && exec npx configurable-http-proxy & exec jupyterhub --config /etc/jupyterhub/jupyterhub_config.py"]
Подробнее здесь: https://stackoverflow.com/questions/795 ... -container
Сломанная аутентификация на контейнере Docker jupyterhub ⇐ Linux
-
Anonymous
1743562765
Anonymous
У меня есть старый сервер IBM Power8, который я пытаюсь продолжить jupyterhub. Там нет предварительно построенных изображений Docker, поэтому я должен сделать свои собственные. Однако, когда я захожу ввести свое имя пользователя и пароль, оно никогда не работает. Нет информации в журналах, кроме уведомлений о неудачных попытках.wget https://github.com/tbrown122387/jhub_powerpc/archive/45219232bc4681038942763e825a071e43df77a9.zip
unzip 45219232bc4681038942763e825a071e43df77a9.zip -d ./
cd jhub_powerpc-45219232bc4681038942763e825a071e43df77a9/
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
docker build -t my-jupyter-ppc64le .
docker run -d -p 443:443 --name jhub my-jupyter-ppc64le
Вот полный dockerfile ниже. Пользователь Taylor является пользователем на сервере за пределами контейнера Docker.
# Use a base image that supports ppc64le architecture
FROM ubuntu:20.04
# Set timezone
ENV TZ=America/New_York
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y tzdata
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
bzip2 \
curl \
ca-certificates \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install NVM
ENV NVM_DIR=/root/.nvm
RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
# Install Node.js and npm using NVM
RUN bash -c "source $NVM_DIR/nvm.sh && nvm install 18 && nvm use 18 && nvm alias default 18"
# Set Node.js and npm in the PATH
ENV PATH="/root/.nvm/versions/node/v18.20.7/bin:$PATH"
# Verify Node.js and npm installation
RUN bash -c "source $NVM_DIR/nvm.sh && node -v && npm -v"
# Install yarn and configurable-http-proxy globally
RUN bash -c "source $NVM_DIR/nvm.sh && npm install -g yarn configurable-http-proxy"
# Ensure configurable-http-proxy is available globally
RUN echo "export PATH=\$PATH:/root/.nvm/versions/node/v18.20.7/bin" >> /root/.bashrc
# Download and install Miniconda
RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-ppc64le.sh && \
chmod +x Miniconda3-latest-Linux-ppc64le.sh && \
./Miniconda3-latest-Linux-ppc64le.sh -b && \
rm Miniconda3-latest-Linux-ppc64le.sh
# Add Miniconda to PATH
ENV PATH="/root/miniconda3/bin:$PATH"
# Ensure conda is available
RUN conda --version
# Install mamba using conda
RUN conda install mamba -c conda-forge -y
# Install JupyterHub and dependencies using mamba
RUN mamba install --yes jupyterhub-singleuser jupyterlab nbclassic "notebook>=7.2.2" jupyterhub[localauth]
# Create SSL directory
RUN mkdir -p /etc/jupyterhub/ssl
# Copy SSL certificate and key (Make sure you have these files before building)
COPY cert.pem /etc/jupyterhub/ssl/cert.pem
COPY key.pem /etc/jupyterhub/ssl/key.pem
# Set correct permissions for SSL files
RUN chmod 600 /etc/jupyterhub/ssl/cert.pem /etc/jupyterhub/ssl/key.pem
# Create JupyterHub config directory
RUN mkdir -p /etc/jupyterhub
# Generate JupyterHub server configuration with LocalAuthenticator
# NB: change "taylor" to your system username you're using outside of Docker
RUN echo "c.Authenticator.admin_users = {'taylor'}" > /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.authenticator_class = 'jupyterhub.auth.LocalAuthenticator'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.LocalAuthenticator.create_system_users = True" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ip = '0.0.0.0'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.port = 443" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ssl_cert = '/etc/jupyterhub/ssl/cert.pem'" >> /etc/jupyterhub/jupyterhub_config.py && \
echo "c.JupyterHub.ssl_key = '/etc/jupyterhub/ssl/key.pem'" >> /etc/jupyterhub/jupyterhub_config.py
# Expose SSL port
EXPOSE 443
# Ensure that the configurable-http-proxy path is set during JupyterHub startup
ENV PATH="/root/.nvm/versions/node/v18.20.7/bin:$PATH"
# Default command to start JupyterHub with SSL
CMD ["bash", "-c", "source $NVM_DIR/nvm.sh && exec npx configurable-http-proxy & exec jupyterhub --config /etc/jupyterhub/jupyterhub_config.py"]
Подробнее здесь: [url]https://stackoverflow.com/questions/79549579/broken-authentication-on-jupyterhub-docker-container[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия