Dockerfile.sandbox 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. FROM python:3.11-slim-bookworm
  2. WORKDIR /mnt/data
  3. RUN apt-get update && apt-get install -y \
  4. gcc \
  5. libffi-dev \
  6. zlib1g-dev \
  7. fonts-arphic-ukai \
  8. fonts-arphic-uming \
  9. fonts-ipafont-mincho \
  10. fonts-ipafont-gothic \
  11. fonts-unfonts-core \
  12. libgdal-dev \
  13. g++ \
  14. && rm -rf /var/lib/apt/lists/*
  15. RUN pip install --no-cache-dir \
  16. pydantic \
  17. tornado \
  18. jupyter_client \
  19. ipython \
  20. ipykernel \
  21. numpy \
  22. pandas \
  23. scipy \
  24. matplotlib \
  25. scikit-learn \
  26. notebook \
  27. beautifulsoup4 \
  28. seaborn \
  29. pytest \
  30. ipywidgets \
  31. sympy \
  32. statsmodels \
  33. joblib \
  34. cython \
  35. lxml \
  36. xlrd \
  37. qrcode \
  38. nltk \
  39. opencv-python \
  40. Pillow \
  41. geopandas
  42. ENV HOME=/mnt/data
  43. RUN find / -perm +6000 -type f -exec chmod a-s {} \; || true
  44. RUN echo "set -o history -o vi" >> /etc/profile
  45. RUN useradd -u 999 -ms /bin/bash appuser
  46. RUN chown -R appuser:appuser /mnt/data
  47. USER appuser
  48. ENV JUPYTER_RUNTIME_DIR=/mnt/data/.local/share/jupyter/runtime
  49. ENV JUPYTER_DATA_DIR=/mnt/data/.local/share/jupyter
  50. ENV JUPYTER_CONFIG_DIR=/mnt/data/.jupyter
  51. COPY sandbox.py /sandbox.py
  52. VOLUME [ "/mnt/data" ]
  53. CMD ["python", "/sandbox.py"]