Spaces:
Sleeping
Sleeping
File size: 745 Bytes
18ea579 a95ab94 18ea579 a95ab94 18ea579 668dc2e 18ea579 668dc2e 18ea579 668dc2e |
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 |
# Use Node.js 18 LTS as base image
FROM node:18-slim
# Set working directory
WORKDIR /app
# Install system dependencies for TensorFlow.js and Canvas
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
build-essential \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
# Copy package files
COPY package*.json ./
# Install Node.js dependencies
RUN npm install --production
# Copy application code
COPY . .
# Make start script executable
RUN chmod +x start.sh
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Set environment variables
ENV NODE_ENV=production
ENV PORT=7860
# Start the server
CMD ["./start.sh"] |