|
FROM python:3.11-alpine |
|
|
|
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories |
|
RUN apk add swi-prolog |
|
RUN apk add --no-cache gcc musl-dev python3-dev |
|
|
|
RUN adduser -D user |
|
USER user |
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
WORKDIR /app |
|
|
|
COPY --chown=user ./requirements.txt requirements.txt |
|
COPY --chown=user ./knowledge_base.pl knowledge_base.pl |
|
RUN pip install --no-cache-dir --upgrade pip |
|
RUN pip install --no-cache-dir --upgrade --user -r requirements.txt |
|
|
|
COPY --chown=user . /app |
|
EXPOSE 7860 |
|
ENV GRADIO_SERVER_NAME="0.0.0.0" |
|
CMD ["python", "app.py"] |