Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions base/scripts/install-opencode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

# Install opencode using the official installer
curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path

# Make opencode available system-wide
mv ${HOME}/.opencode/bin/opencode /usr/local/bin/opencode
rm -rf ${HOME}/.opencode
1 change: 1 addition & 0 deletions base/scripts/onyxia-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ if command -v R >/dev/null 2>&1; then
fi
fi


# The commands related to setting the various repositories (R/CRAN, pip)
# are located in specific script
source /opt/onyxia-set-repositories.sh
Expand Down
2 changes: 2 additions & 0 deletions jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN /opt/install-jupyterlab.sh && \
# Generate jupyter server config
jupyter server --generate-config && \
jupyter lab clean && \
# Install opencode
/opt/install-opencode.sh && \
# Fix user permissions
/opt/fix-user-permissions.sh && \
# Clean
Expand Down
4 changes: 4 additions & 0 deletions jupyter/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ commandTests:
command: "which"
args: ["duckdb"]
expectedOutput: ["/usr/local/bin/duckdb"]
- name: "Does the binary exists?"
command: "which"
args: ["opencode"]
expectedOutput: ["/usr/local/bin/opencode"]
2 changes: 2 additions & 0 deletions rstudio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ COPY --chmod=0755 scripts/ /opt/
RUN /rocker_scripts/install_rstudio.sh && \
/rocker_scripts/install_pandoc.sh && \
/opt/configure-rstudio.sh && \
# Install opencode
/opt/install-opencode.sh && \
# Fix user permissions
/opt/fix-user-permissions.sh && \
# Clean
Expand Down
4 changes: 4 additions & 0 deletions rstudio/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ commandTests:
command: "which"
args: ["duckdb"]
expectedOutput: ["/usr/local/bin/duckdb"]
- name: "Does the binary exists?"
command: "which"
args: ["opencode"]
expectedOutput: ["/usr/local/bin/opencode"]
2 changes: 2 additions & 0 deletions vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ COPY --chown=${USERNAME}:${GROUPNAME} settings/Remote.json ${REMOTE_CONFIG_DIR}/
# Install VSCode
RUN /opt/install-vscode.sh && \
/opt/install-vscode-extensions.sh && \
# Install opencode
/opt/install-opencode.sh && \
# Fix user permissions
/opt/fix-user-permissions.sh && \
# Clean
Expand Down
4 changes: 4 additions & 0 deletions vscode/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ commandTests:
command: "which"
args: ["duckdb"]
expectedOutput: ["/usr/local/bin/duckdb"]
- name: "Does the binary exists?"
command: "which"
args: ["opencode"]
expectedOutput: ["/usr/local/bin/opencode"]