theo commited on
Commit
2656c08
1 Parent(s): 8b77729

remove unneeded file, fix dockerfile

Browse files
build_docker_image.sh CHANGED
@@ -1,21 +1,26 @@
1
  #!/usr/bin/env bash
2
 
3
-
4
  cleanup() {
5
- rm -f Dockerfile
6
  }
7
 
8
  trap cleanup ERR EXIT
9
 
 
 
 
 
 
 
 
10
  cat > Dockerfile << EOF
11
  FROM python
12
- COPY requirements.txt .
13
- COPY tagging_app.py .
14
  RUN pip install -r requirements.txt
 
15
  CMD ["streamlit", "run", "tagging_app.py"]
16
  EOF
17
 
18
  set -eEx
19
 
20
- ./build_metadata_file.py
21
  docker build -t dataset-tagger .
 
1
  #!/usr/bin/env bash
2
 
 
3
  cleanup() {
4
+ rm -f Dockerfile .dockerignore
5
  }
6
 
7
  trap cleanup ERR EXIT
8
 
9
+ ./build_metadata_file.py
10
+
11
+ cat > .dockerignore << EOF
12
+ .git
13
+ datasets
14
+ EOF
15
+
16
  cat > Dockerfile << EOF
17
  FROM python
18
+ COPY requirements.txt tagging_app.py task_set.json language_set.json license_set.json metadata_927d44346b12fac66e97176608c5aa81843a9b9a.json ./
 
19
  RUN pip install -r requirements.txt
20
+ RUN pip freeze
21
  CMD ["streamlit", "run", "tagging_app.py"]
22
  EOF
23
 
24
  set -eEx
25
 
 
26
  docker build -t dataset-tagger .
build_metadata_file.py CHANGED
@@ -52,5 +52,7 @@ def load_ds_datas():
52
 
53
  if __name__ == "__main__":
54
  head_sha, datas = load_ds_datas()
55
- with open(f"metadata_{head_sha}.json", "w") as fi:
 
 
56
  fi.write(json.dumps(datas))
 
52
 
53
  if __name__ == "__main__":
54
  head_sha, datas = load_ds_datas()
55
+ fn = f"metadata_{head_sha}.json"
56
+ print(f"writing to '{fn}'")
57
+ with open(fn, "w") as fi:
58
  fi.write(json.dumps(datas))
language_set_full.json DELETED
The diff for this file is too large to render. See raw diff
 
tagging_app.py CHANGED
@@ -46,7 +46,6 @@ creator_set = {
46
  ########################
47
 
48
 
49
- @st.cache(allow_output_mutation=True)
50
  def load_ds_datas():
51
  metada_exports = sorted(
52
  [f for f in Path.cwd().iterdir() if f.name.startswith("metadata_")],
 
46
  ########################
47
 
48
 
 
49
  def load_ds_datas():
50
  metada_exports = sorted(
51
  [f for f in Path.cwd().iterdir() if f.name.startswith("metadata_")],