heiyuheiyu commited on
Commit
a5deffc
·
verified ·
1 Parent(s): 18eef29

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -0
Dockerfile CHANGED
@@ -149,6 +149,18 @@ def restore():
149
 
150
  if not flag_exists and not force_restore:
151
  print("Restore skip: initialized.flag not found, this is first deploy or rebuild.")
 
 
 
 
 
 
 
 
 
 
 
 
152
  return
153
 
154
  if force_restore:
 
149
 
150
  if not flag_exists and not force_restore:
151
  print("Restore skip: initialized.flag not found, this is first deploy or rebuild.")
152
+ import io
153
+ flag_content = b"initialized\n"
154
+ api.upload_file(
155
+ path_or_fileobj=io.BytesIO(flag_content),
156
+ path_in_repo=INIT_FLAG,
157
+ repo_id=repo_id,
158
+ repo_type="dataset",
159
+ token=token,
160
+ commit_message="Create initialized.flag on first deploy",
161
+ )
162
+
163
+ print("initialized.flag created in Dataset.")
164
  return
165
 
166
  if force_restore: