Spaces:
Running
Running
File size: 997 Bytes
1ce1443 1e8420e e8b8c1e 1ce1443 1e8420e 0a53b5b 1ce1443 1e8420e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 MPLCONFIGDIR=/tmp/matplotlib XDG_CACHE_HOME=/tmp \
OPENPELS_STATIC_DIR=/app/static \
OPENPELS_ENGINE=/app/simulator/library/ngspice/studies/xfly6s_xfly8s_c3l_scaled_comparison/gui/xfly_compare_gui.py \
OPENPELS_RUN_DIR=/tmp/openpels-runtime PORT=7860
RUN apt-get update && apt-get install -y --no-install-recommends ngspice \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements-simulator.txt ./
RUN pip install --no-cache-dir -r requirements-simulator.txt
RUN useradd -m -u 1000 appuser
COPY --chown=appuser static ./static
COPY --chown=appuser simulator ./simulator
COPY --chown=appuser sp2 ./sp2
COPY --chown=appuser rsc2 ./rsc2
COPY --chown=appuser si2 ./si2
COPY --chown=appuser buck_stacked ./buck_stacked
COPY --chown=appuser operating_conditions.py server.py simulator_service.py simulator_frame.py simulator_bridge.js simulator-source.json ./
USER appuser
EXPOSE 7860
CMD ["python3", "server.py", "--host", "0.0.0.0"]
|