logic-engine / Dockerfile
ghostdrive1's picture
Upload folder using huggingface_hub
f39ce5d verified
Raw
History Blame Contribute Delete
680 Bytes
FROM python:3.12-slim
WORKDIR /app
# Install Redis + Node.js (for building UI)
RUN apt-get update && \
apt-get install -y --no-install-recommends redis-server curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
# Install Python deps
RUN pip install --no-cache-dir fastapi uvicorn httpx pydantic redis
# Copy backend
COPY main.py .
COPY start.sh .
RUN chmod +x start.sh
# Copy and build frontend
COPY node3-ui/ /tmp/ui/
RUN cd /tmp/ui && npm install --legacy-peer-deps && npm run build && \
mv /tmp/ui/dist /app/static && \
rm -rf /tmp/ui
EXPOSE 7860
CMD ["./start.sh"]