kostis-init's picture
restore temp dir
8b3ba2f
raw
history blame
996 Bytes
import os
import subprocess
from src.ui import create_ui
try:
version = subprocess.check_output(["minizinc", "--version"], text=True, stderr=subprocess.STDOUT)
print(f"🧠 MiniZinc version (from Docker env): {version.strip()}")
solvers = subprocess.check_output(["minizinc", "--solvers"], text=True, stderr=subprocess.STDOUT)
print(f"πŸ’‘ MiniZinc solvers (from Docker env):\n{solvers.strip()}")
except FileNotFoundError:
print("❌ MiniZinc command not found. Check PATH in Dockerfile and setup.sh.")
except subprocess.CalledProcessError as e:
print(f"❌ MiniZinc command failed. Output: {e.output}")
except Exception as e:
print(f"❌ Error checking MiniZinc: {e}")
if __name__ == "__main__":
print("Starting the Gradio app...", flush=True)
demo = create_ui()
print("Gradio app created successfully.", flush=True)
demo.queue().launch(server_name="0.0.0.0", server_port=7860, debug=True)
print("Gradio app launched successfully.", flush=True)