Skip to content

Commit

Permalink
Update pip installation
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLoecker committed May 11, 2023
1 parent 84fb1a5 commit de9eeab
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
51 changes: 25 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,36 @@ COPY /environment.yaml "${HOME}/environment.yaml"
COPY --chown=1000:100 main "${HOME}"/main

# Install cobamp, bioservices, and troppo manually, as problems arose when installing using pip
RUN git clone https://github.com/babessell1/cobamp.git \
&& git clone https://github.com/babessell1/troppo.git \
&& pip install ./cobamp \
&& echo "COBAMP DONE" \
&& pip install ./troppo \
&& echo "TROPPO DONE" \
&& rm -rf cobamp troppo \
&& pip cache purge
RUN git clone https://github.com/babessell1/cobamp.git && \
git clone https://github.com/babessell1/troppo.git && \
pip install ./cobamp ./troppo && \
rm -rf cobamp troppo && \
pip cache purge

# Install python-related items
# R channel will be placed at the bottom
RUN conda config --quiet --add channels r \
&& conda config --quiet --add channels bioconda \
&& conda config --quiet --add channels conda-forge \
&& mamba env update --name=base --file="${HOME}/environment.yaml" \
&& R -e "devtools::install_github('babessell1/zFPKM')" \
RUN conda config --quiet --add channels r && \
conda config --quiet --add channels bioconda && \
conda config --quiet --add channels conda-forge && \
mamba env update --name=base --file="${HOME}/environment.yaml" && \
pip install --quiet --upgrade pip && \
pip install "memote==0.13.0" "framed==0.5.2" "bioservices==1.11.2" "jupyterlab-spreadsheet-editor==0.6.1" && \
R -e "devtools::install_github('babessell1/zFPKM')" && \
# Install gurbori
&& wget --quiet --directory-prefix="${HOME}" https://packages.gurobi.com/${GRB_SHORT_VERSION}/gurobi${GRB_VERSION}_linux64.tar.gz \
&& tar -xf "${HOME}/gurobi${GRB_VERSION}_linux64.tar.gz" \
&& rm -f "${HOME}/gurobi${GRB_VERSION}_linux64.tar.gz" \
&& mv ${HOME}/gurobi* ${HOME}/gurobi \
&& rm -f "${HOME}/environment.yaml" \
&& rm -r "${HOME}/work" \
&& pip cache purge \
&& conda clean --all --yes --force-pkgs-dirs
wget --quiet --directory-prefix="${HOME}" https://packages.gurobi.com/${GRB_SHORT_VERSION}/gurobi${GRB_VERSION}_linux64.tar.gz && \
tar -xf "${HOME}/gurobi${GRB_VERSION}_linux64.tar.gz" && \
rm -f "${HOME}/gurobi${GRB_VERSION}_linux64.tar.gz" && \
mv ${HOME}/gurobi* ${HOME}/gurobi && \
rm -f "${HOME}/environment.yaml" && \
rm -r "${HOME}/work" && \
pip cache purge && \
conda clean --all --yes --force-pkgs-dirs

# Update jupyter notebook configuration
RUN 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"
RUN 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"

VOLUME /home/joyvan/main/data/local_files
13 changes: 6 additions & 7 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ dependencies:
- python-libsbml==5.19.2
- optlang==1.5.2
- cobra==0.25.0
- pip==22.1.2
- pip:
- memote==0.13.0
- framed==0.5.2
- bioservices==1.11.2
- jupyterlab-spreadsheet-editor==0.6.1

# - pip==22.1.2
# - pip:
# - memote==0.13.0
# - framed==0.5.2
# - bioservices==1.11.2
# - jupyterlab-spreadsheet-editor==0.6.1

0 comments on commit de9eeab

Please sign in to comment.