Skip to content

Commit

Permalink
Added Dockerfile to continue creating docker image, mistakingly deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLoecker committed Sep 14, 2023
1 parent 0a19d2f commit 2f2d84b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
main/src/tests
/docs
/.github
*~
**/.ipynb_checkpoints/
README.md
LICENSE
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM jupyter/r-notebook:latest

COPY /environment.yaml "${HOME}/environment.yaml"
COPY --chown=1000:100 main "${HOME}"/main

# Install python-related items
# Remove "python" from the pinned file so we can install our own version
RUN sed -i '/^python/d' /opt/conda/conda-meta/pinned && \
conda config --quiet --add channels conda-forge && \
conda config --quiet --add channels bioconda && \
conda config --quiet --add channels r && \
# Update conda
mamba env update --name=base --file="${HOME}/environment.yaml" && \
R -e "devtools::install_github('babessell1/zFPKM')" && \
# Trust the jupyter notebook
jupyter trust "${HOME}/main/COMO.ipynb" && \
echo "c.ServerApp.ip = '0.0.0.0'" >> "${HOME}/.jupyter/jupyter_notebook_config.py" && \
echo "c.ServerApp.root_dir = '${HOME}/main'" >> "${HOME}/.jupyter/jupyter_notebook_config.py" && \
echo "c.ServerApp.token = ''" >> "${HOME}/.jupyter/jupyter_notebook_config.py" && \
echo "c.ServerApp.password = ''" >> "${HOME}/.jupyter/jupyter_notebook_config.py" && \
# Purge cache information, reducing image size
pip cache purge && \
conda clean --all --yes --force-pkgs-dirs && \
rm -f "${HOME}/environment.yaml"

VOLUME /home/joyvan/main/data/local_files

0 comments on commit 2f2d84b

Please sign in to comment.