File size: 809 Bytes
abbf29d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
FROM datasetteproject/datasette:0.64.1

# huggingface spaces run as user 1000
RUN adduser hf-space --uid 1000 --disabled-password --gecos '' && \
    mkdir /home/hf-space/app && \
    chown hf-space: /home/hf-space/app
WORKDIR /home/hf-space/app

RUN datasette install datasette-configure-fts && \
    datasette install datasette-render-image-tags

RUN apt-get update && \
    apt-get install -y --no-install-recommends git && \
    apt-get clean && \
    rm -rf /var/lib/apt && \
    rm -rf /var/lib/dpkg/info/*

USER hf-space

# spaces default port
EXPOSE 7860
ENTRYPOINT ["datasette", "--host=0.0.0.0", "--port=7860"]
CMD ["."]

ENV PYTHONPATH=/home/hf-space/app/src/

COPY src src
COPY metadata.json settings.json ./

RUN src/import-git.sh && \
    datasette inspect *.db --inspect-file=inspect-data.json