Spaces:
Sleeping
Sleeping
File size: 1,400 Bytes
9e3caf3 4f739e4 9e3caf3 4f739e4 |
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 41 42 43 44 45 46 47 48 49 50 51 52 |
FROM node:18-slim
# Install canvas dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libcairo2-dev \
libpango1.0-dev \
libjpeg-dev \
libgif-dev \
librsvg2-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --production
# Copy application files
COPY index.js ./
# Copy ALL model files (all formats)
COPY age_gender_model-shard1 ./
COPY age_gender_model-weights_manifest.json ./
COPY face_expression_model-shard1 ./
COPY face_expression_model-weights_manifest.json ./
COPY face_landmark_68_model-shard1 ./
COPY face_landmark_68_model-weights_manifest.json ./
COPY face_landmark_68_tiny_model-shard1 ./
COPY face_landmark_68_tiny_model-weights_manifest.json ./
COPY face_recognition_model-shard1 ./
COPY face_recognition_model-shard2 ./
COPY face_recognition_model-weights_manifest.json ./
COPY mtcnn_model-shard1 ./
COPY mtcnn_model-weights_manifest.json ./
COPY ssd_mobilenetv1_model-shard1 ./
COPY ssd_mobilenetv1_model-shard2 ./
COPY ssd_mobilenetv1_model-weights_manifest.json ./
COPY tiny_face_detector_model-shard1 ./
COPY tiny_face_detector_model-weights_manifest.json ./
# Expose port 7860 (Hugging Face Spaces default)
EXPOSE 7860
# Set environment variable for port
ENV PORT=7860
# Run the application
CMD ["node", "index.js"] |