forked from rkube/dashboard_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (27 loc) · 1.24 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
FROM continuumio/miniconda3
WORKDIR /dashboard_v2
ENV FLASK_ENV development
# Install gcc
RUN apt-get update && \
apt-get -y install gcc git npm && \
rm -rf /var/lib/apt/lists/*
# Create a conda environment
COPY environment.yml .
RUN conda env create -f environment.yml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "flask", "/bin/bash", "-c"]
# Make sure the environment is activated:
RUN echo "Make sure flask is installed:" && python -c "import flask"
# Get a specific version of the dasboard
#RUN git clone https://github.com/rkube/dashboard_v2.git && cd dashboard_v2 && git checkout 371cae5
COPY . dashboard_v2
# Change workdir to cloned code repo
WORKDIR /dashboard_v2/dashboard_v2
RUN cd dashboard/web/dashboard_v2_vue && npm install
RUN cd dashboard/web/dashboard_v2_vue && ./node_modules/.bin/vue-cli-service build --mode development --no-clean
COPY mongo_secret /dashboard_v2/dashboard_v2
RUN ln -sf /dev/stdout dashboard.log
ENTRYPOINT [ "/bin/bash", "start.sh"]
#ENTRYPOINT ["conda", "activate", "flask", "&&", "python", "backend.py"]
#ENTRYPOINT ["conda", "run", "-n", "flask", "python", "backend.py"]
#ENTRYPOINT ["conda", "run", "-n", "flask", "python", "-c", "import os; i=9; print(i); print(os.getpid())"]