-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prod
67 lines (50 loc) · 1.62 KB
/
Dockerfile.prod
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
61
62
63
64
65
66
67
# syntax=docker/dockerfile:1
# FROM python:3.7-slim-buster
FROM continuumio/miniconda3
RUN apt-get update --allow-releaseinfo-change && apt-get install -y libpango1.0-0 \
# libcairo2 \
# libpq-dev \
# python3-dev \
# perl \
# git \
curl \
# python3-sklearn \
# python3-sklearn-lib \
# python3-sklearn \
# cmake \
# gcc \
# libblas-dev \
certbot \
# liblapack-dev \
# gfortran \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
RUN bash Mambaforge-$(uname)-$(uname -m).sh -b
RUN conda create -n env python=3.7
# RUN certbot certonly --standalone --email pkedia@salud.unm.edu --agree-tos -d unmtid-services.net --server https://acme-staging-v02.api.letsencrypt.org/directory --staging --force-interactive
RUN echo "source activate env" > ~/.bashrc
ENV PATH /opt/conda/envs/env/bin:$PATH
USER ${UID}:${GID}
# MAINTAINER
MAINTAINER Priyansh Kedia<kediapriyansh@gmail.com>
RUN echo "${GID}"
# ENV DEBIAN_FRONTEND noninteractive
# Set environment variables
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY requirements.txt .
# RUN conda install cython
RUN python3 -m pip install --upgrade pip
RUN pip install -r requirements.txt
WORKDIR /app
EXPOSE 8000
# copy entrypoint.sh
COPY ./entrypoint.prod.sh /entrypoint.prod.sh
RUN sed -i 's/\r$//g' /entrypoint.prod.sh
RUN chmod +x /entrypoint.prod.sh
# COPY ./letsencrypt /letsencrypt
# RUN chmod -R 755 /letsencrypt
COPY . .
# COPY letsencrypt letsencrypt
ENTRYPOINT ["/entrypoint.prod.sh"]