Spaces:
Sleeping
Sleeping
File size: 865 Bytes
0fb7c30 |
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 |
FROM python:3.10-slim
LABEL python_version=python3.10
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Poetry virtual environment setup
ENV POETRY_NO_INTERACTION=1
ENV POETRY_HOME /opt/env
ENV POETRY_CACHE_DIR /opt/.cache
# mandatory !!
ENV POETRY_VIRTUALENVS_IN_PROJECT=1
RUN python3 -m venv $POETRY_HOME
RUN $POETRY_HOME/bin/pip install -U pip setuptools
RUN $POETRY_HOME/bin/pip install poetry==1.7.1
ENV PATH $PATH:$POETRY_HOME/bin
COPY . /app/
WORKDIR /app
# creating the poetry virtual environment
RUN poetry lock --no-update
RUN poetry install --no-root
ENV PATH="/app/.venv/bin:$PATH"
EXPOSE $PORT
HEALTHCHECK CMD curl --fail http://localhost:$PORT/_stcore/health
ENTRYPOINT streamlit run fe.py --server.port=$PORT --server.address=0.0.0.0 |