@@ -56,18 +56,46 @@ RUN conda config --add channels conda-forge \
5656 && conda config --add channels bioconda \
5757 && conda install -y \
5858 python=3.9 \
59+ ipython=8.22.0 \
60+ notebook \
5961 biopython \
62+ pysam \
63+ seaborn \
64+ plotly \
65+ python-kaleido \
6066 bwa \
6167 samtools \
6268 velvet \
6369 bcftools=1.15 \
6470 kraken2 \
6571 && conda clean -afy
6672
73+ # ────── Generate and tweak Jupyter defaults ──────
74+ RUN jupyter notebook --generate-config \
75+ && sed -i \
76+ -e "s|#c.NotebookApp.ip = 'localhost'|c.NotebookApp.ip = '0.0.0.0'|" \
77+ -e "s|#c.NotebookApp.open_browser = True|c.NotebookApp.open_browser = False|" \
78+ ~/.jupyter/jupyter_notebook_config.py \
79+ && printf "\
80+ c.NotebookApp.token = ''\n\
81+ c.NotebookApp.password = ''\n\
82+ c.NotebookApp.allow_root = True\n" \
83+ >> ~/.jupyter/jupyter_notebook_config.py
6784
6885# 2.2 Copy the compiled binary in
6986COPY --from=builder /usr/local/bin/popins4snake /usr/local/bin/
7087COPY --from=builder /usr/local/bin/sickle /usr/local/bin/
71- # 2.3 Default entrypoint: show help
72- ENTRYPOINT ["popins4snake"]
73- CMD ["--help"]
88+
89+ # 2.3 Expose Jupyter’s default port
90+ EXPOSE 8888
91+
92+ # 2.4 one-liner to start notebook
93+ RUN printf '#!/usr/bin/env bash\nexec jupyter notebook\n' \
94+ > /usr/local/bin/start-notebook \
95+ && chmod +x /usr/local/bin/start-notebook
96+
97+ # # 2.3 Default entrypoint: show help
98+ # ENTRYPOINT ["jupyter", "notebook", "--ip=0.0.0.0", "--no-browser", "--allow-root"]
99+ # CMD ["--NotebookApp.token=''", "--NotebookApp.password=''", "--NotebookApp.notebook_dir=/"]
100+ # ENTRYPOINT ["popins4snake"]
101+ # CMD ["--help"]
0 commit comments