Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jiadong324 committed Sep 20, 2022
1 parent a9eec85 commit 7e2513a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 21 deletions.
66 changes: 53 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,63 @@
#
#CMD ["python", "SVision"]

FROM continuumio/miniconda3
#FROM continuumio/miniconda3

WORKDIR .
#WORKDIR .
#
#COPY . .
#
#RUN conda env create -f environment.yml
#
## Make RUN commands use the new environment:
#SHELL ["conda", "run", "-n", "svisionenv", "/bin/bash", "-c"]
#
## Demonstrate the environment is activated:
#RUN echo "Make sure tensorflow is installed:"
#RUN python -c "import pyvcf"
#
#ENV PATH /opt/conda/envs/svisionenv/bin:$PATH

COPY . .
# The code to run when container is started:
#COPY SVision .
#ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "svisionenv", "python"]

RUN conda env create -f environment.yml
#WORKDIR .
#COPY environment.yml .
#
#RUN conda env create -f environment.yml
#
#SHELL ["conda", "run", "-n", "svisionenv", "/bin/bash", "-c"]
#
#RUN conda init bash
#RUN echo "conda activate svisionenv" > ~/.bashrc
#
#RUN pip install SVision

# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "svisionenv", "/bin/bash", "-c"]
#RUN conda init bash \
# && conda activate sivsionenv \

# Demonstrate the environment is activated:
RUN echo "Make sure tensorflow is installed:"
RUN python -c "import tensorflow"
## Install required packages to conda environment
#RUN pip install numpy==1.16.4 \
# && pip install scipy==1.5.4 \
# && pip install opencv-python-headless \
# && pip install intervaltree \
# && pip install beautifulsoup4 \
# && pip install pysam \
# && pip install pyvcf \
# && pip install tensorflow==1.14.0 \
# && pip install SVision
#CMD ["/opt/conda/envs/svisionenv/bin/SVision", "--help"]

ENV PATH /opt/conda/envs/svisionenv/bin:$PATH

# The code to run when container is started:
#COPY SVision .
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "svisionenv", "python"]
FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --assume-yes apt-utils
RUN apt-get update && apt-get install -y git python3>=3.6 python3-pip

RUN cd /tmp \
&& git clone https://github.com/xjtu-omics/SVision.git \
&& cd SVision \
&& pip3 install . \
&& cp -r /usr/local/bin/SVision /usr/bin/

14 changes: 7 additions & 7 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ channels:
- defaults
dependencies:
- python=3.6
- tensorflow=1.14.0
- pip=21.1.3
- pysam=0.16.0
- pip
- pip:
- numpy==1.16.4
- scipy==1.5.4
- opencv-python-headless==4.5.4.58
- beautifulsoup4==4.9.3
- intervaltree==3.1.0
- pyvcf
- opencv-python-headless
- beautifulsoup4
- intervaltree
- pyvcf
- tensorflow==1.14.0
- pysam
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

zip_safe=False,
python_requires='>=3.6',
# install_requires=['scipy', 'beautifulsoup4', 'numpy==1.16'],
install_requires=['scipy==1.5.4', 'numpy==1.16.4', 'tensorflow==1.14.0',
'pysam', 'pyvcf', 'intervaltree', 'opencv-python-headless', 'beautifulsoup4'],

scripts=['SVision'],

)

0 comments on commit 7e2513a

Please sign in to comment.