forked from acannistra/planet-snowcover
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (40 loc) · 1.42 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:16.04
MAINTAINER Tony Cannistra <[email protected]>
RUN apt-get update \
&& apt-get install -y software-properties-common curl \
&& add-apt-repository ppa:jonathonf/python-3.6 \
&& apt autoremove -y \
&& apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y python3.6
RUN apt-get -y update && apt-get install -y --no-install-recommends \
wget \
nginx \
bzip2 \
libgcc-5-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://bootstrap.pypa.io/get-pip.py && python3.6 get-pip.py
RUN pip install setuptools
# Anaconda
RUN wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
RUN bash Anaconda3-5.0.1-Linux-x86_64.sh -b
RUN rm Anaconda3-5.0.1-Linux-x86_64.sh
ENV PATH /root/anaconda3/bin:$PATH
# Install dependancies
COPY pytorch_p36.yml /opt/program/
RUN conda env update --file /opt/program/pytorch_p36.yml
RUN apt-get update \
&& apt-get install -y libsm6 libxext6 libxrender-dev
COPY credentials /root/.aws/credentials
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
RUN apt-get install -y git
SHELL ["/bin/bash", "-c"]
RUN echo "source activate pytorch_p36" > ~/.bashrc
ENV PATH="/opt/conda/envs/pytorch_p36/bin:${PATH}"
ENV PATH="/opt/program:${PATH}"
# Set up the program in the image
COPY start.sh /opt/program
WORKDIR /opt/program
ENTRYPOINT ["/bin/bash", "start.sh"]