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
#!/bin/bash
# Binder post-build script for RusTorch
# RusTorch用Binderポストビルドスクリプト
set -e
echo "🔧 Building RusTorch for Binder..."
echo "🔧 Binder用RusTorchをビルド中..."
# Ensure we're in the right directory
cd $HOME
# Build RusTorch Python bindings (CPU-only for Binder)
echo "📦 Building Python bindings..."
echo "📦 Pythonバインディングをビルド中..."
maturin develop --release
# Verify installation
echo "🧪 Testing installation..."
echo "🧪 インストールをテスト中..."
python3 -c "
try:
import rustorch
print('✅ RusTorch imported successfully!')
print('✅ RusTorchのインポートに成功しました!')
except ImportError as e:
print(f'❌ Import failed: {e}')
print('❌ インポートに失敗しました')
exit(1)
"
# Enable Jupyter Lab extensions
echo "🎨 Enabling Jupyter Lab extensions..."
echo "🎨 Jupyter Lab拡張機能を有効化中..."
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build || true
jupyter lab build --minimize=False || true
echo "✅ Binder setup complete!"
echo "✅ Binderセットアップ完了!"