2023-05-02 18:24:48 +00:00
|
|
|
FROM python:3.11 as builder
|
|
|
|
|
|
|
|
WORKDIR /usr/app
|
|
|
|
ENV PATH="/usr/app/venv/bin:$PATH"
|
2023-04-28 09:13:51 +00:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y git
|
2023-05-02 18:24:48 +00:00
|
|
|
RUN mkdir -p /usr/app
|
|
|
|
RUN python -m venv ./venv
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
2023-04-28 09:13:51 +00:00
|
|
|
|
2023-05-02 18:24:48 +00:00
|
|
|
RUN pip install -r requirements.txt
|
2023-04-28 09:13:51 +00:00
|
|
|
|
|
|
|
# RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
|
|
|
# RUN pip config set global.trusted-host mirrors.aliyun.com
|
|
|
|
|
2023-05-02 18:24:48 +00:00
|
|
|
FROM python:3.11-alpine
|
2023-04-28 09:13:51 +00:00
|
|
|
|
2023-05-02 18:24:48 +00:00
|
|
|
WORKDIR /usr/app
|
|
|
|
ENV PATH="/usr/app/venv/bin:$PATH"
|
|
|
|
|
|
|
|
COPY --from=builder /usr/app/venv ./venv
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN cp ./gui/streamlit_app.py .
|
2023-04-28 09:13:51 +00:00
|
|
|
|
|
|
|
CMD ["streamlit", "run", "streamlit_app.py"]
|
2023-05-02 18:24:48 +00:00
|
|
|
|
|
|
|
EXPOSE 8501
|