Spaces:
Sleeping
Sleeping
FROM python:3.11-alpine | |
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories | |
RUN apk add git | |
RUN apk add swi-prolog | |
RUN apk add --no-cache gcc musl-dev python3-dev | |
WORKDIR /app | |
COPY ./knowledge_base.pl knowledge_base.pl | |
COPY ./requirements.txt requirements.txt | |
RUN pip install --no-cache-dir --upgrade pip | |
RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
RUN git clone https://github.com/SWI-Prolog/packages-swipy.git | |
RUN mv packages-swipy/janus/janus.pl . | |
RUN rm -r packages-swipy | |
RUN zip janus.zip janus.pl | |
RUN echo 1 | swipl pack install janus | |
RUN python -c "import janus_swi as janus" | |
COPY . /app | |
EXPOSE 7860 | |
ENV GRADIO_SERVER_NAME="0.0.0.0" | |
CMD ["python", "app.py"] |