diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 0efb81b..d59b128 100644 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -9,9 +9,9 @@ if [ -f "python/requirements.txt" ]; then fi # Install R dependencies -if [ -f "r/install_packages.R" ]; then - Rscript r/install_packages.R -fi +#if [ -f "r/install_packages.R" ]; then +# Rscript r/install_packages.R +#fi # This may be done by the user # Set up renv for R @@ -20,8 +20,9 @@ fi #fi # change the default working directory for RStudio -echo "session-default-working-dir=${CODESPACE_VSCODE_FOLDER}" >> /etc/rstudio/rsession.conf +echo "session-default-working-dir=${CODESPACE_VSCODE_FOLDER}" | sudo tee -a /etc/rstudio/rsession.conf -rstudio-server start && jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' +rstudio-server start > rstudio_server.log 2>&1 & +jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token='' 2>&1 & echo "Dev environment setup completed!" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de90e11..cace446 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,12 +23,12 @@ jobs: - name: Run Quarto in Docker container run: | - docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace my-quarto-image bash -c " + docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace demo-quarto-image bash -c " echo 'Creating gallery directory...' mkdir -p gallery && \ echo 'gallery directory created.' - FOLDERS=(python, R) + FOLDERS=(python R) echo 'Folders to process: ${FOLDERS[@]}' for FOLDER in \"\${FOLDERS[@]}\"; do diff --git a/Dockerfile b/Dockerfile index a25c3e7..1e44689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,9 @@ RUN dpkg -i quarto-1.5.57-linux-amd64.deb # Expose ports for RStudio (8787) and Jupyter (8888) -#WORKDIR /workspaces +WORKDIR /app + +COPY r /app/r EXPOSE 8787 EXPOSE 8888 @@ -65,6 +67,9 @@ EXPOSE 8888 # Install renv globally for all users RUN R -e "install.packages('renv', repos='https://cran.rstudio.com/')" +# Install R packages +RUN Rscript /app/r/install_packages.R + # Add /usr/local/bin to the PATH for all users ENV PATH="/usr/local/bin:$PATH"