-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Sydney-Informatics-Hub/gitpod
Set up gitpod for self-directed training
- Loading branch information
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Use the Gitpod workspace base image | ||
FROM gitpod/workspace-base | ||
|
||
USER root | ||
|
||
# Set environment variables | ||
ENV TZ=Australia/Sydney | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set the timezone and install required utilities | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ | ||
apt-get update --quiet && \ | ||
apt-get install --quiet --yes \ | ||
apt-transport-https \ | ||
apt-utils \ | ||
sudo \ | ||
git \ | ||
less \ | ||
wget \ | ||
curl \ | ||
tree \ | ||
graphviz \ | ||
zip \ | ||
unzip \ | ||
default-jre \ | ||
ca-certificates | ||
|
||
# Install Nextflow | ||
RUN curl -s https://get.nextflow.io | bash && \ | ||
chmod 755 ./nextflow && \ | ||
mv ./nextflow /usr/local/bin | ||
|
||
# Create .nextflow directory and set proper permissions | ||
RUN mkdir -p /home/gitpod/.nextflow && \ | ||
chown -R gitpod:gitpod /home/gitpod/.nextflow | ||
|
||
# Change user back to gitpod | ||
USER gitpod | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
results/ | ||
work/ | ||
site/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": "." | ||
} | ||
], | ||
"settings": { | ||
"editor.tabSize": 2, | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true | ||
}, | ||
"gitpod.workspaceFolder": "/workspace/hello-nextflow" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Custom workspace and checkout locations | ||
workspaceLocation: gitpod/gitpod-ws.code-workspace # Refers to your .code-workspace file | ||
checkoutLocation: gitpod | ||
|
||
# GitHub prebuild configuration | ||
github: | ||
prebuilds: | ||
# Enable prebuilds for the master/default branch | ||
master: true | ||
# Disable prebuilds for all branches | ||
branches: false | ||
# Enable prebuilds for pull requests from this repo | ||
pullRequests: true | ||
# Enable prebuilds for pull requests from forks | ||
pullRequestsFromForks: true | ||
# Disable "Review in Gitpod" comment on PRs | ||
addComment: false | ||
# Disable "Review in Gitpod" badge on PRs | ||
addBadge: false | ||
|
||
# Docker image to use for the workspace | ||
image: .gitpod.Dockerfile | ||
|
||
# Tasks to execute during workspace initialisation and startup | ||
tasks: | ||
- before: printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc && exit | ||
|
||
# FOR TESTING: check out workspace in the `gitpod` branch | ||
- name: Checkout gitpod branch | ||
init: | | ||
git fetch origin gitpod # Fetch the latest changes for the gitpod branch | ||
git checkout gitpod || git checkout -b gitpod origin/gitpod # Switch to the gitpod branch | ||
# Create directory structure | ||
- name: Create Directories | ||
init: | | ||
mkdir -p ~/hello-nextflow/part1 | ||
mkdir -p ~/hello-nextflow/part2 | ||
# Download containers to be used in part 2 | ||
- name: Download containers | ||
init: | | ||
docker pull quay.io/biocontainers/salmon:1.10.1--h7e5ed60_0 | ||
docker pull quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0 | ||
docker pull quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0 | ||
command: docker run hello-world | ||
|
||
# Open docs in a web browser | ||
- name: Start web server | ||
command: gp ports await 23000 && gp preview https://sydney-informatics-hub.github.io/hello-nextflow/ | ||
|
||
# Start the tutorial | ||
- name: Start tutorial | ||
command: | | ||
cd hello-nextflow | ||
source $HOME/.bashrc | ||
export PS1='\[\e[3;36m\]${PWD/*\//} ->\[\e[0m\] ' | ||
unset JAVA_TOOL_OPTIONS | ||
clear | ||
# VSCode extensions to install in the workspace | ||
vscode: | ||
extensions: | ||
- codezombiech.gitignore # Support for .gitignore files | ||
- cssho.vscode-svgviewer # SVG viewer | ||
- esbenp.prettier-vscode # Prettier for markdown formatting | ||
#- EditorConfig.EditorConfig # Support for .editorconfig | ||
#- Gruntfuggly.todo-tree # Display TODO/FIXME comments in a tree view | ||
- nextflow.nextflow # Nextflow syntax highlighting | ||
- streetsidesoftware.code-spell-checker # Spell checker for source code | ||
- ms-vscode.live-server # Live server for web development |