dsiaom / Dockerfile
next-social's picture
add more
8ea1e8a
raw
history blame contribute delete
371 Bytes
FROM python:3.11
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
COPY requirements.txt requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip3 install --no-cache-dir -r requirements.txt
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
EXPOSE 7860
CMD ["sh", "-c", "python3 server.py --notebook --listen"]