LLMChoice / docker-entrypoint.sh
Peacemanguy's picture
fix for permission denied
cc771fe
raw
history blame
1.03 kB
#!/bin/sh
set -e
echo "Starting GPU Leaderboard application..."
# Create data directory if it doesn't exist
mkdir -p /app/data || true
echo "Ensuring data directory exists: /app/data"
# Initialize data.json if it doesn't exist
if [ ! -f /app/data/data.json ]; then
# Try to create the file, but don't fail if we can't
echo '{}' > /app/data/data.json 2>/dev/null || echo "Warning: Could not create data.json, will use existing file if available"
if [ -f /app/data/data.json ]; then
echo "Initialized empty data.json file"
fi
fi
# Initialize ips.json if it doesn't exist
if [ ! -f /app/data/ips.json ]; then
# Try to create the file, but don't fail if we can't
echo '{}' > /app/data/ips.json 2>/dev/null || echo "Warning: Could not create ips.json, will use existing file if available"
if [ -f /app/data/ips.json ]; then
echo "Initialized empty ips.json file"
fi
fi
echo "Data files initialized successfully"
echo "Starting application with: $@"
# Execute the provided command (node start.js)
exec "$@"