Fazil T
Fazil T
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
I have done this on runpod (overriding the start cmd) bash -c 'source ~/.bashrc && conda activate py && conda install -y jupyter && ./start.sh' but somehow i still needed webterminal launch jupyter. 🤷‍♂️
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
Here is my dockerfile for reference:
ARG MINICONDA_VERSION=24.4.0-0

FROM continuumio/miniconda3:${MINICONDA_VERSION}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash

WORKDIR /

RUN mkdir /workspace

# git, wget is installed in the base image
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt install --yes --no-install-recommends curl libgl1 software-properties-common openssh-server nginx && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen

COPY requirements/ requirements/

RUN conda env create -n py -f requirements/dev/environment-gpu-full.yml && \
conda clean -afy

# Activate conda env inside
SHELL ["conda", "run", "-n", "py", "/bin/bash", "-c"]

# This line is necessary to run the container interactively
RUN echo "conda activate py" >> ~/.bashrc

# Remove existing SSH host keys
RUN rm -f /etc/ssh/ssh_host_*

# NGINX Proxy
COPY scripts/runpod/docker/nginx.conf /etc/nginx/nginx.conf
COPY scripts/runpod/docker/readme.html /usr/share/nginx/html/readme.html

# Start Scripts
COPY scripts/runpod/docker/start.sh /
RUN chmod +x /start.sh

COPY . /workspace

# Set the default command for the container
CMD [ "/start.sh" ]
ARG MINICONDA_VERSION=24.4.0-0

FROM continuumio/miniconda3:${MINICONDA_VERSION}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash

WORKDIR /

RUN mkdir /workspace

# git, wget is installed in the base image
RUN apt-get update --yes && \
apt-get upgrade --yes && \
apt install --yes --no-install-recommends curl libgl1 software-properties-common openssh-server nginx && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen

COPY requirements/ requirements/

RUN conda env create -n py -f requirements/dev/environment-gpu-full.yml && \
conda clean -afy

# Activate conda env inside
SHELL ["conda", "run", "-n", "py", "/bin/bash", "-c"]

# This line is necessary to run the container interactively
RUN echo "conda activate py" >> ~/.bashrc

# Remove existing SSH host keys
RUN rm -f /etc/ssh/ssh_host_*

# NGINX Proxy
COPY scripts/runpod/docker/nginx.conf /etc/nginx/nginx.conf
COPY scripts/runpod/docker/readme.html /usr/share/nginx/html/readme.html

# Start Scripts
COPY scripts/runpod/docker/start.sh /
RUN chmod +x /start.sh

COPY . /workspace

# Set the default command for the container
CMD [ "/start.sh" ]
start.sh, nginx.conf is copied from the runpod github repo.
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
I have the port link but it always says port is not ready. When i click it's HTTP 502 which is why i have to open the web terminal, run 1-2 commands and then it becomes ready
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
No description
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
Perhaps something to do with start jupyter notebook button that default runpod templates have during gpu deployment screen. I don't have that option since I have a custom template.
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
I've digged deep into the start.sh that runpod has, it invokes jupyter if JUPYTER_PASSWORD set. https://github.com/runpod/containers/blob/main/container-template/start.sh#L75 However setting environment variables is happening after that: https://github.com/runpod/containers/blob/main/container-template/start.sh#L96 I'm wondering how that lines gets invoked. Right now i have to open a shell into my pod, do conda install -y jupyter and it just barely updates a file called certifi and then jupyter command can be found. so I launch it and connect it.
16 replies
RRunPod
Created by Fazil T on 12/22/2024 in #⛅|pods
Unable to run jupyter on custom docker image
the first screenshot is from my docker container running locally. As you can see jupyter is installed. it works fine there. The command not found is happening only on runpod
16 replies