|
FROM python:3.10-slim-buster |
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
USER user |
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
COPY requirements.txt requirements.txt |
|
RUN pip3 install -r requirements.txt |
|
|
|
ENV SOAR_HOME="${HOME}/app/soar-bin_debian-buster" |
|
ENV PYTHONPATH="${SOAR_HOME}:${PYTHONPATH}" |
|
ENV DYLD_LIBRARY_PATH="${SOAR_HOME}:${DYLD_LIBRARY_PATH}" |
|
|
|
COPY . . |
|
|
|
USER root |
|
RUN chmod 777 ~/app/* |
|
USER user |
|
|
|
EXPOSE 7860 7860 |
|
|
|
ENTRYPOINT ["python3"] |
|
CMD [ "gradio_app.py"] |
|
|