File size: 799 Bytes
64dfdfb | 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 | FROM python:3.12-slim
# Install Node.js for building the frontend
RUN apt-get update && apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy floorplan source first and build the whl
COPY floorplan/ ./floorplan/
RUN pip install gradio hatchling hatch-requirements-txt hatch-fancy-pypi-readme build && \
cd floorplan && \
pip install gradio-cli && \
gradio cc build --no-generate-docs && \
pip install dist/gradio_floorplan-0.0.1-py3-none-any.whl
# Install remaining app dependencies
COPY requirements.txt ./
RUN pip install google-genai python-dotenv pillow pydantic
# Copy app
COPY app.py ./
EXPOSE 7860
CMD ["python", "app.py"]
|