File size: 685 Bytes
760cec5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
FROM python:3.10-slim
# Install OpenSCAD CLI and required system libraries for headless OpenSCAD
RUN apt-get update && \
apt-get install -y --no-install-recommends \
openscad libgl1 libglu1-mesa xvfb \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy and install Python dependencies (will use prebuilt wheels, no compilers needed)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Ensure OpenSCAD runs headlessly
ENV OPENSCAD_NO_GUI=1
# Expose HF Spaces default port
EXPOSE 7860
# Launch the Streamlit app
CMD ["streamlit","run","streamlit_app.py","--server.port","7860","--server.address","0.0.0.0"] |