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