ThinkPower / Dockerfile
minjiechen's picture
Publish ThinkPower topology analysis website
3bb2683 verified
Raw History Blame Contribute Delete
765 Bytes
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 MPLCONFIGDIR=/tmp/matplotlib XDG_CACHE_HOME=/tmp PORT=8080 ENABLE_NGSPICE=1
RUN apt-get update && apt-get install -y --no-install-recommends ngspice && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements-xfly-compare.txt ./
RUN pip install --no-cache-dir -r requirements-xfly-compare.txt
RUN useradd -m -u 1000 appuser && mkdir -p /app/output /tmp/matplotlib && chown -R appuser:appuser /app /tmp/matplotlib
COPY --chown=appuser:appuser library/ngspice/studies/xfly6s_xfly8s_c3l_scaled_comparison ./library/ngspice/studies/xfly6s_xfly8s_c3l_scaled_comparison
COPY --chown=appuser:appuser app.py models.py agent.py ./
COPY --chown=appuser:appuser static ./static
USER appuser
EXPOSE 8080
CMD ["python3", "app.py"]