diff --git a/deepspace/Dockerfile b/deepspace/Dockerfile index 9576c0c..7dcd21f 100755 --- a/deepspace/Dockerfile +++ b/deepspace/Dockerfile @@ -3,29 +3,40 @@ FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu24.04 ENV DEBIAN_FRONTEND noninteractive +# Install necessary packages RUN apt-get update && apt-get install -y --no-install-recommends \ wget \ curl \ software-properties-common \ - python3-full \ + python3 \ python3-pip \ python3-venv \ + nodejs \ + npm \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* WORKDIR /workspace # Install code-server -RUN wget https://github.com/cdr/code-server/releases/download/v4.92.2/code-server_4.92.2_amd64.deb \ - && dpkg -i code-server_4.92.2_amd64.deb \ - && rm code-server_4.92.2_amd64.deb +RUN curl -fsSL https://code-server.dev/install.sh | sh -# Create a virtual environment and install Jupyter +# Create a virtual environment RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" -RUN pip3 install --no-cache-dir jupyter -EXPOSE 8080 8888 +# Install Jupyter and ipykernel in the virtual environment +RUN pip install jupyter ipykernel -# Start both code-server and Jupyter Notebook -CMD code-server --bind-addr 0.0.0.0:8080 & jupyter notebook --ip=0.0.0.0 --port=8888 --no-browser --allow-root +# Register the kernel with Jupyter +RUN ipython kernel install --name "python3" --user + +# Install some common VS Code extensions +RUN code-server --install-extension ms-python.python \ + && code-server --install-extension ms-toolsai.jupyter + +# Expose port for code-server +EXPOSE 8080 + +# Start code-server +CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password"]