wayne-chi commited on
Commit
cc874e5
·
verified ·
1 Parent(s): 705b5f2

Update download_models.py

Browse files
Files changed (1) hide show
  1. download_models.py +5 -2
download_models.py CHANGED
@@ -36,11 +36,14 @@ SOURCE_CSV = "fuel_properties.csv" # Path to your CSV in the repo or local dir
36
  DEST_DIR = "/tmp/data"
37
  DEST_CSV = os.path.join(DEST_DIR, "fuel_properties.csv")
38
 
39
- # Create the /tmp/data directory if it doesn't exist
40
  os.makedirs(DEST_DIR, exist_ok=True)
 
41
 
42
  # Copy the CSV file
43
  shutil.copy2(SOURCE_CSV, DEST_CSV)
44
 
45
- print(f"Copied {SOURCE_CSV} {DEST_CSV}")
 
46
 
 
 
36
  DEST_DIR = "/tmp/data"
37
  DEST_CSV = os.path.join(DEST_DIR, "fuel_properties.csv")
38
 
39
+ # Create /tmp/data with full permissions for owner
40
  os.makedirs(DEST_DIR, exist_ok=True)
41
+ os.chmod(DEST_DIR, 0o777) # rwx for everyone (adjust if you want stricter)
42
 
43
  # Copy the CSV file
44
  shutil.copy2(SOURCE_CSV, DEST_CSV)
45
 
46
+ # Make sure the file is writable by the app
47
+ os.chmod(DEST_CSV, 0o666) # rw for everyone
48
 
49
+ print(f"Copied {SOURCE_CSV} → {DEST_CSV} with write permissions")