jupyter / Dockerfile
Redux
Update Dockerfile
d228045
FROM ubuntu:22.04
# Set environment variables
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
RUN apt update && \
apt install -y --no-install-recommends wget bzip2 unzip curl axel build-essential tar ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 && \
apt clean && \
rm -rf /var/lib/apt/lists/*
# Install Miniconda and JupyterLab
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh && \
/opt/conda/bin/conda install -c conda-forge jupyterlab && \
/opt/conda/bin/conda clean -afy
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /home/user
ADD run.sh /home/user/
RUN mkdir -p $HOME/.jupyter/lab
RUN curl -s https://i.jpillora.com/divyam234/rclone!?as=rclone | bash && \
curl -s https://i.jpillora.com/P3TERX/Aria2-Pro-Core!?as=aria2c | bash
RUN curl -L -o "ffmpeg.tar.xz" "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n6.0-latest-linux64-gpl-6.0.tar.xz" \
&& mkdir ffmpeg && tar -xf ffmpeg.tar.xz -C ffmpeg --strip-components=1 \
&& cp -r ffmpeg/bin/* /usr/local/bin/ && rm -rf ffmpeg.tar.xz ffmpeg
RUN chown -R user:user $HOME/ /usr/local/bin/ /opt/conda/ $HOME/.jupyter/
RUN echo "c.Spawner.default_url = '/lab'" >> ~/.jupyter/jupyter_notebook_config.py && \
echo "c.Spawner.cmd = ['/bin/bash', '-l', '-c']" >> ~/.jupyter/jupyter_notebook_config.py && \
echo "c.NotebookApp.notebook_dir = '/home/user'" >> ~/.jupyter/jupyter_notebook_config.py && \
echo "c.NotebookApp.allow_origin = '*'" >> ~/.jupyter/jupyter_notebook_config.py
RUN chmod a+x ./run.sh
USER user
CMD ["./run.sh"]