27 lines
1002 B
Python
27 lines
1002 B
Python
import os
|
|
|
|
# ROOT DATA FOLDER
|
|
DATA_FOLDER = "./data"
|
|
|
|
# LANGGRAPH CHECKPOINT FILE
|
|
sqlite_folder = f"{DATA_FOLDER}/sqlite-db"
|
|
os.makedirs(sqlite_folder, exist_ok=True)
|
|
LANGGRAPH_CHECKPOINT_FILE = f"{sqlite_folder}/checkpoints.sqlite"
|
|
|
|
# UPLOADS FOLDER
|
|
UPLOADS_FOLDER = f"{DATA_FOLDER}/uploads"
|
|
os.makedirs(UPLOADS_FOLDER, exist_ok=True)
|
|
|
|
# PODCASTS FOLDER
|
|
# Matches the root that build_episode_output_dir() (commands/podcast_commands.py)
|
|
# creates episode directories under when called with DATA_FOLDER in production.
|
|
PODCASTS_FOLDER = f"{DATA_FOLDER}/podcasts"
|
|
os.makedirs(PODCASTS_FOLDER, exist_ok=True)
|
|
|
|
# TIKTOKEN CACHE FOLDER
|
|
# Reads TIKTOKEN_CACHE_DIR from the environment so Docker can redirect the cache
|
|
# to a path outside /data/ (which is typically volume-mounted and would hide the
|
|
# pre-baked encoding baked into the image at build time).
|
|
TIKTOKEN_CACHE_DIR = os.environ.get("TIKTOKEN_CACHE_DIR", "").strip() or f"{DATA_FOLDER}/tiktoken-cache"
|
|
os.makedirs(TIKTOKEN_CACHE_DIR, exist_ok=True)
|