podcraft_web_app / build_for_spaces.sh
Nagesh Muralidhar
Initial commit of PodCraft application
fd52f31
raw
history blame
816 Bytes
#!/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"