Soar / Dockerfile
bryan-stearns
Fixing Docker issue
75e5e79
raw
history blame contribute delete
No virus
872 Bytes
FROM python:3.10-slim-buster
### Set up user with permissions
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
### Finish up with app-specific content
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"]