File size: 816 Bytes
fd52f31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
set -e

echo "===> Building PodCraft for HuggingFace Spaces <===="

# Navigate to frontend directory
echo "Building frontend..."
cd frontend/podcraft

# Install dependencies
echo "Installing frontend dependencies..."
npm install

# Build the frontend
echo "Creating production build..."
npm run build

# Back to root directory
cd ../../

# Make sure static directory exists
mkdir -p app/static

# Copy build to static directory (this will be mounted by FastAPI)
echo "Copying frontend build to static directory..."
cp -r frontend/podcraft/build/* app/static/

# Copy the Spaces Dockerfile to main Dockerfile
echo "Setting up Dockerfile for Spaces deployment..."
cp Dockerfile.spaces Dockerfile

echo "Build setup completed successfully!"
echo "You can now push this to your HuggingFace Space repository"