-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
97 lines (76 loc) · 3.33 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# For more information, please refer to https://aka.ms/vscode-docker-python
# FROM python:3.8-slim-buster
FROM ubuntu:18.04
# FROM python:3.6
ENV HOME /root
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# RUN apt-get update \
# && apt install -y software-properties-common \
# && add-apt-repository ppa:deadsnakes/ppa \
# && apt-get install --no-install-recommends -y \
# python3.9 python3-pip
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
python3.7 python3-pip python3-dev \
libpython3.7-dev
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install setuptools
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
ssh \
gcc \
wget \
g++ \
libsuitesparse-dev \
python-cvxopt \
&& rm -rf /var/lib/apt/lists/
RUN apt-get update -y && apt-get install -y python-dev
RUN apt-get update -y && apt-get install -y libopenblas-dev
RUN apt-get update -y && apt-get install -y libatlas-base-dev
RUN apt-get update -y && apt-get install -y libblas-dev
RUN apt-get update -y && apt-get install -y liblapack-dev
RUN apt-get update -y && apt-get install -y glpk-utils
RUN apt-get update -y && apt-get install -y libglpk-dev
# RUN wget http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-4.5.3.tar.gz
# RUN tar -xf SuiteSparse-4.5.3.tar.gz
# RUN export CVXOPT_SUITESPARSE_SRC_DIR=$(pwd)/SuiteSparse
# Anaconda installing
# RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
# && bash Miniforge3-Linux-aarch64.sh -b -p $HOME/miniconda \
# && rm -f Miniforge3-Linux-aarch64.sh
# RUN export PATH=$HOME/miniconda/bin:$PATH
# RUN conda install -y -c conda-forge cvxopt
# RUN git clone https://github.com/DrTimothyAldenDavis/SuiteSparse.git
# RUN pushd SuiteSparse; \
# git checkout v5.6.0; \
# popd; \
# export CVXOPT_SUITESPARSE_SRC_DIR=$(pwd)/SuiteSparse;
# RUN export CPPFLAGS="-I/usr/include/suitesparse"
# RUN git config --global core.sshCommand 'ssh -o UserKnownHostsFile=/dev/null -o StricHostKeyChecking=no'
RUN git clone https://github.com/DrTimothyAldenDavis/SuiteSparse.git $HOME/SuiteSparse
ENV CVXOPT_SUITESPARSE_SRC_DIR $HOME/SuiteSparse
ENV CVXOPT_SUITESPARSE_INC_DIR $HOME/SuiteSparse/UMFPACK
ENV CVXOPT_BUILD_GLPK 1
# Install pip requirements
COPY requirements.txt .
RUN python3 -m pip install cmake
RUN python3 -m pip install -r requirements.txt
RUN git clone https://github.com/fikisipi/elkai.git $HOME/elkai
RUN python3 -m pip install -e $HOME/elkai
WORKDIR /app
COPY . /app
RUN python3 /app/manage.py makemigrations
RUN python3 /app/manage.py migrate
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
# RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
# USER appuser
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
# EXPOSE 8000
# CMD ["gunicorn", "--bind", "0.0.0.0:8000", "DCCWWebDemo.wsgi"]