Skip to content

Commit c5ffc70

Browse files
committed
Fix Streamlit Docker build:
Switch from conda to python base image
1 parent 0290606 commit c5ffc70

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

streamlit/Dockerfile

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
FROM continuumio/miniconda3:4.9.2 AS build
2-
COPY environment.yml /
3-
RUN conda env create -f environment.yml && \
4-
conda install -c conda-forge conda-pack && \
5-
conda-pack -n deeplc-streamlit -o /tmp/env.tar && \
6-
mkdir /venv && cd /venv && tar xf /tmp/env.tar && \
7-
rm /tmp/env.tar && \
8-
/venv/bin/conda-unpack
9-
10-
FROM debian:buster-slim AS runtime
11-
WORKDIR /deeplc
12-
COPY --from=build /venv /venv
13-
ENV VIRTUAL_ENV=/venv
14-
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
1+
FROM python:3.10-slim-buster
152
COPY . /deeplc
16-
RUN pip install "deeplc>=0.1.29"
3+
WORKDIR /deeplc
4+
RUN pip install --upgrade pip
5+
RUN pip install -r requirements.txt
176
ENV DEEPLC_LIBRARY_PATH="/tmp/deeplc_library.txt"
187
EXPOSE 8501
198
CMD ["streamlit", "run", "deeplc_streamlit.py"]

streamlit/environment.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

streamlit/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
plotly
2+
pandas
3+
statsmodels
4+
streamlit>=0.88
5+
deeplc

0 commit comments

Comments
 (0)