-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.ui
48 lines (35 loc) · 1.25 KB
/
Dockerfile.ui
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
FROM ubuntu:latest
# https://pythonspeed.com/articles/activate-conda-dockerfile/
WORKDIR /home
# Install base utilities
RUN apt-get update \
&& apt-get install -y build-essential \
&& apt-get install -y wget \
&& apt-get install -y git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
# Put conda in path so we can use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH
RUN conda create --name intheirownwords python=3.10
SHELL ["conda", "run", "-n", "intheirownwords", "/bin/bash", "-c"]
# install required python libs
COPY setup/ui-requirements.txt requirements.txt
RUN pip install -r requirements.txt
WORKDIR /home/intheirownwords
COPY src/es_*.py ./
COPY src/ui_helpers.py .
COPY src/storage.py .
COPY src/delete.py .
COPY src/api_import_client.py .
COPY src/api_search_server.py .
COPY src/st_inject_api.py .
COPY src/1_Search.py .
COPY src/pages/*.py pages/
COPY doc/ui.md doc/ui.md
COPY doc/arch.png doc/arch.png
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "intheirownwords", "streamlit", "run", "1_Search.py"]