Nicky Nicolson commited on
Commit
691c525
1 Parent(s): 2fa3172

Fixed used of working dir when creating metadata json file

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -16,16 +16,18 @@ RUN ls -lh /data
16
  RUN unzip /data/gbif-occs.zip -d /data
17
  RUN ls -lh /data
18
  COPY ./tab2csv.py /code/tab2csv.py
19
- COPY ./getDownloadMetadata.py /code/getDownloadMetadata.py
20
 
21
  RUN python tab2csv.py --createcols /data/${GBIF_DOWNLOAD_ID}.csv /data/gbifocc.csv
22
  RUN csvs-to-sqlite /data/gbifocc.csv /code/gbifocc.db
23
  RUN ls -l /code
24
  RUN sqlite-utils tables /code/gbifocc.db --counts
25
  RUN sqlite-utils enable-fts /code/gbifocc.db gbifocc collectorNameAndNumber
26
-
27
  RUN chmod 755 /code/gbifocc.db
28
 
29
- RUN python getDownloadMetadata.py ./metadata.json /code/metadata.json --download_id=$GBIF_DOWNLOAD_ID
 
 
 
30
 
31
  CMD ["datasette", "/code/gbifocc.db", "-m", "/code/metadata.json", "--host", "0.0.0.0", "--port", "7860"]
 
16
  RUN unzip /data/gbif-occs.zip -d /data
17
  RUN ls -lh /data
18
  COPY ./tab2csv.py /code/tab2csv.py
19
+
20
 
21
  RUN python tab2csv.py --createcols /data/${GBIF_DOWNLOAD_ID}.csv /data/gbifocc.csv
22
  RUN csvs-to-sqlite /data/gbifocc.csv /code/gbifocc.db
23
  RUN ls -l /code
24
  RUN sqlite-utils tables /code/gbifocc.db --counts
25
  RUN sqlite-utils enable-fts /code/gbifocc.db gbifocc collectorNameAndNumber
 
26
  RUN chmod 755 /code/gbifocc.db
27
 
28
+ # Create datasette metadata file
29
+ COPY ./getDownloadMetadata.py /code/getDownloadMetadata.py
30
+ COPY ./metadata.json /code/metadata.json
31
+ RUN python getDownloadMetadata.py /code/metadata.json /code/metadata.json --download_id=$GBIF_DOWNLOAD_ID
32
 
33
  CMD ["datasette", "/code/gbifocc.db", "-m", "/code/metadata.json", "--host", "0.0.0.0", "--port", "7860"]