FROM node:20-slim # Install pnpm RUN npm install -g pnpm WORKDIR /app # Copy all package.json files for dependency installation COPY package.json pnpm-lock.yaml* ./ COPY apps/simulator/package.json ./apps/simulator/ COPY apps/worker/package.json ./apps/worker/ # Install all dependencies in the monorepo RUN pnpm install # Copy the rest of the monorepo files COPY . . # Build the simulator service RUN cd apps/simulator && pnpm install && ./node_modules/.bin/tsc # Hugging Face Spaces run on port 7860 by default EXPOSE 7860 # Set environment variables ENV PORT=7860 ENV NODE_ENV=production # Ensure the correct entry point is used # Based on the original Dockerfile: CMD ["node", "apps/simulator/dist/apps/simulator/src/index.js"] # But we need to make sure the path is correct after build CMD ["node", "apps/simulator/dist/apps/simulator/src/index.js"]