Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
FROM python:3.10 | |
WORKDIR /app | |
ENV POETRY_VERSION=1.6.1 | |
RUN pip install "poetry==$POETRY_VERSION" | |
RUN poetry config virtualenvs.create false | |
COPY ./poetry.lock /app/poetry.lock | |
COPY ./pyproject.toml /app/pyproject.toml | |
RUN poetry install --no-dev | |
# User | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME /home/user | |
ENV PATH $HOME/.local/bin:$PATH | |
WORKDIR $HOME | |
RUN mkdir app | |
WORKDIR $HOME/app | |
COPY . $HOME/app | |
RUN --mount=type=secret,id=OPEN_API_KEY,mode=0444,required=true | |
EXPOSE 8501 | |
CMD streamlit run src/app/v2/app.py \ | |
--server.headless true \ | |
--server.enableCORS false \ | |
--server.enableXsrfProtection false \ | |
--server.fileWatcherType none |