Spaces:
Running on CPU Upgrade

File size: 731 Bytes
261407d
 
 
 
 
 
 
 
216ab65
 
 
 
 
 
261407d
 
 
 
 
e7f2f0c
216ab65
261407d
 
216ab65
261407d
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
26
# syntax=docker/dockerfile:1.0.2-experimental
FROM ghcr.io/cinnamon/kotaemon:feat-paper_demo-full as base_image

RUN apt update -qqy \
    && apt install -y unzip \
    && \
    apt-get clean && \
    apt-get autoremove

RUN useradd -m -u 1000 user
RUN --mount=type=ssh chown -R user:user /app
RUN --mount=type=ssh chown -R user:user /usr/local/lib/python3.10
USER user

COPY data.zip /app
RUN --mount=type=secret,id=KH_DEMO_MODE,mode=0444 \
    if [ -f "/run/secrets/KH_DEMO_MODE" ] && [ "$(cat /run/secrets/KH_DEMO_MODE)" = "true" ]; then \
    unzip /app/data.zip && rm /app/data.zip; \
    fi

ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
ENV KH_FEATURE_USER_MANAGEMENT=false

ENTRYPOINT ["sh", "/app/launch.sh"]