2024-10-18 18:42:33 +02:00
|
|
|
FROM python:3.10-slim
|
|
|
|
|
2024-10-18 21:02:29 +02:00
|
|
|
# Install system dependencies
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
r-base && \
|
|
|
|
R --quiet -e "install.packages('Sleuth2')" && \
|
|
|
|
R --quiet -e "library(Sleuth2); write.csv(ex0221, file = \"data.csv\")" && \
|
|
|
|
apt-get purge -y r-base && \
|
|
|
|
apt-get autoremove -y && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2024-10-18 18:42:33 +02:00
|
|
|
|
2024-10-18 21:02:29 +02:00
|
|
|
# Upgrade pip and install Python packages including rpy2
|
|
|
|
RUN pip install --upgrade pip && \
|
|
|
|
pip install jupyter notebook pandas numpy matplotlib
|
2024-10-18 18:42:33 +02:00
|
|
|
|
2024-10-18 21:02:29 +02:00
|
|
|
# Set CMD to run Jupyter notebook
|
|
|
|
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--allow-root", "--no-browser"]
|