# Use the official Jupyter Docker image | |
FROM jupyter/base-notebook:latest | |
# Switch to the root user to perform privileged actions | |
USER root | |
# Install Jupyter Lab and additional packages | |
RUN pip install --no-cache-dir \ | |
jupyterlab \ | |
torch \ | |
tensorflow \ | |
transformers \ | |
datasets \ | |
matplotlib \ | |
seaborn \ | |
scikit-learn \ | |
pandas | |
# Copy the app.py script to the container | |
COPY app.py /home/jovyan/app.py | |
# Expose the ports Jupyter Lab and the redirect server will run on | |
EXPOSE 8888 8000 | |
# Switch back to the notebook user | |
USER $NB_UID | |
# Start the servers using app.py | |
CMD ["python", "/home/jovyan/app.py"] |