Spaces:

File size: 722 Bytes
db45583
4242e42
1847354
cdb7844
f9c8f00
6b78a54
012b2fa
4242e42
 
 
 
 
 
38bc588
 
 
 
4242e42
6d7e538
38bc588
6d7e538
4242e42
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 ./knowledge_base.pl knowledge_base.pl
# COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade gradio
RUN pip install --no-cache-dir --upgrade git+https://github.com/yuce/pyswip@master#egg=pyswip

RUN swipl --version
RUN python -c "from pyswip import Prolog"

COPY --chown=user . /app
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"]