Spaces:
Runtime error
Runtime error
File size: 1,040 Bytes
e6f931e |
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 |
FROM python:3.11
# Download ID is set as a space variable
# By default it is a download of all Solanum preserved specimen records (c600K)
ARG GBIF_DATASET_ID=$GBIF_DATASET_ID
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Download GBIF occurrences and prepare for use with datasette
RUN mkdir /data
ADD https://api.gbif.org/v1/literature/export?format=TSV&gbifDatasetKey=${GBIF_DATASET_ID} /data/gbif-citations.tsv
COPY ./tab2csv.py /code/tab2csv.py
RUN python tab2csv.py --createcols /data/gbif-citations.tsv /data/gbif-citations.csv
RUN csvs-to-sqlite /data/gbif-citations.csv /code/gbifcit.db
RUN ls -l /code
RUN sqlite-utils tables /code/gbifcit.db --counts
RUN chmod 755 /code/gbifcit.db
COPY ./metadata.json /code/metadata.json
RUN python getDownloadMetadata.py --dataset_id=${GBIF_DATASET_ID} /code/metadata.json /code/metadata.json
CMD ["datasette", "/code/gbifcit.db", "-m", "/code/metadata.json", "--host", "0.0.0.0", "--port", "7860"]
|