eswar0474/FL_IDS
0
1FROM python:3.11-slim2 3WORKDIR /app4 5# Install Node.js and system dependencies6RUN apt-get update && apt-get install -y \7 curl \8 gcc \9 g++ \10 && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \11 && apt-get install -y nodejs \12 && rm -rf /var/lib/apt/lists/*13 14# Copy the entire project15COPY . .16 17# Build the frontend18WORKDIR /app/frontend19RUN npm install20RUN npm run build21 22# Install backend dependencies23WORKDIR /app/backend24RUN pip install --no-cache-dir -r requirements.txt25 26# Create necessary directories for the backend27RUN mkdir -p data models logs static28 29# Return to backend folder for execution30WORKDIR /app/backend31 32# Expose the port used by Hugging Face Spaces33EXPOSE 786034 35# Set environment variables for production36ENV NODE_ENV=production37ENV ENVIRONMENT=production38 39# Run FastAPI with uvicorn on port 786040CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]41 