zhtet/RegBotBeta
1
1FROM python:3.12.12 3WORKDIR /docker4 5ADD . /docker6 7COPY requirements.txt requirements.txt8RUN pip install --upgrade pip9RUN pip install --no-cache-dir -r requirements.txt10 11COPY . .12 13# Set up a new user named "user" with user ID 100014RUN useradd -m -u 1000 user15 16# Switch to the "user" user17USER user18 19# Set home to the user's home directory20ENV HOME=/home/user \21 PATH=/home/user/.local/bin:$PATH22 23# Set the working directory to the user's home directory24WORKDIR $HOME/app25 26# Set the working directory to the user's home directory27COPY --chown=user . $HOME/app28 29EXPOSE 850130 31HEALTHCHECK CMD --fail http://localhost:8501/_stcore/health32 33# Get the secret key and clone it as repo at build time34# RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \35# git clone $(cat /run/secrets/OPENAI_API_KEY)36 37ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]38# CMD [ "streamlit" , "run", "app.py"]39# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]