-
Notifications
You must be signed in to change notification settings - Fork 0
/
old_Dockerfile
60 lines (48 loc) · 2.11 KB
/
old_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
53
54
55
56
57
58
59
60
FROM python:3.8.15-slim
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:/opt/conda/envs/env/bin:$PATH
RUN apt-get update --fix-missing
RUN apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
python3-pip software-properties-common build-essential \
make sqlite3 gfortran python-dev \
git mercurial subversion
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /root/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh \
&& echo "Running $(conda --version)" && \
conda init bash && \
. /root/.bashrc && \
conda update conda
ARG TINI_VERSION=0.19.0
RUN apt-get install -y curl grep sed dpkg && \
curl -L "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini_$TINI_VERSION.deb" > tini.deb && \
dpkg -i tini.deb && \
rm tini.deb && \
apt-get clean
RUN apt update -y && apt install -y --fix-missing --no-install-recommends \
python3-pip software-properties-common build-essential \
cmake sqlite3 gfortran python-dev
# gdal vesion restriction due to fiona not supporting gdal>2.4.3
ARG GDAL_VERSION=3.5.3
ARG CONDA_ENV=/home/cyan-waterbody
COPY environment.yml /src/environment.yml
#RUN conda env update -n=$CONDA_ENV -f /src/environment.yml
RUN conda env create -p=cyan-waterbody --file /src/environment.yml
RUN conda install -p=cyan-waterbody --force-reinstall -c conda-forge gdal -y
#RUN conda update -n cyan-waterbody conda -y
RUN conda info
COPY . /src/
# Updating Anaconda packages
#RUN conda install -n=$CONDA_ENV -c conda-forge uwsgi
COPY uwsgi.ini /etc/uwsgi/uwsgi.ini
ENV PYTHONPATH /src:/src/cyan_waterbody/:$CONDA_ENV:$PYTHONPATH
ENV PATH /src:/src/cyan_waterbody/:$CONDA_ENV:$PATH
WORKDIR /src
EXPOSE 8080
#ENTRYPOINT ["uwsgi", "--ini", "/etc/uwsgi/uwsgi.ini"]
#ENTRYPOINT ["flask", "run", "-p", "8080", "-h", "0.0.0.0", "--debugger"]
ENTRYPOINT ["conda", "run", "-p", "/home/cyan-waterbody", "--no-capture-output","python", "wb_flask.py"]