File size: 966 Bytes
fff13d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

# Entrypoint script for Blaxel Manim sandbox
# This script initializes the sandbox environment with Manim and FFmpeg

echo "Starting Blaxel Manim Sandbox..."

# Start the sandbox API (required by Blaxel)
/usr/local/bin/sandbox-api &

# Wait for sandbox API to be ready
echo "Waiting for sandbox API..."
while ! nc -z localhost 8080; do
  sleep 0.1
done

echo "Sandbox API ready"

# Initialize the environment
echo "Setting up Manim environment..."

# Create working directories
mkdir -p /app/animations
mkdir -p /app/outputs
mkdir -p /tmp/media

# Verify installations
echo "Verifying Python installation..."
python3 --version

echo "Verifying Manim installation..."
python3 -c "import manim; print(f'Manim version: {manim.__version__}')" || echo "WARNING: Manim import failed"

echo "Verifying FFmpeg installation..."
ffmpeg -version | head -n 1

echo "Environment setup complete!"
echo "Ready to render animations..."

# Keep the container running
wait