Screen-VLA / Dockerfile
Gemini
VLA Data Generator - Complete TypeScript/React app with backend
256cef9
# Use Node.js 20 LTS version (required by @google/generative-ai)
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package files for frontend
COPY package*.json ./
# Install frontend dependencies
RUN npm ci
# Copy frontend source code
COPY . .
# Build the frontend application
RUN npm run build
# Set up backend
WORKDIR /app/backend
# Copy backend package file
COPY backend/package.json ./
# Install backend dependencies
RUN npm install
# Copy backend source
COPY backend/server.js ./
# Create a startup script that runs the unified server
WORKDIR /app
RUN echo '#!/bin/sh' > /start.sh && \
echo 'echo "Starting VLA Data Generator..."' >> /start.sh && \
echo 'cd /app/backend && node server.js' >> /start.sh && \
chmod +x /start.sh
# Remove serve since backend handles everything
# RUN npm install -g serve
# Expose the port that Hugging Face Spaces expects
EXPOSE 7860
# Set environment variable for the port
ENV PORT=7860
# Command to run the application
CMD ["/start.sh"]