Skip to content

Commit

Permalink
Merge pull request #2 from github/add-admin-info
Browse files Browse the repository at this point in the history
Update dev container and add delivery notes
  • Loading branch information
GeekTrainer authored Dec 6, 2023
2 parents ae94faf + 328071a commit 99e516d
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 5 deletions.
25 changes: 22 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# Setup for dotnet installation
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb

# Install dotnet
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends dotnet-sdk-8.0

# Setup for node installation
RUN apt-get update
RUN apt-get install -y ca-certificates curl gnupg
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

# Set node version (change as needed)
ENV NODE_MAJOR 20
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

# Install node
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends nodejs
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5432, 3000, 5000]
"forwardPorts": [5432, 3000, 5000, 8000, 8080],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",
"postCreateCommand": "nvm install --lts"

// Configure tool-specific properties.
// "customizations": {},
Expand Down
34 changes: 34 additions & 0 deletions admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Administering the GitHub Copilot hack workshop

To help onboard customers with GitHub Copilot we created this hackathon-style workshop. The goal is to allow developers to gain hands-on experience with GitHub Copilot by creating an application using the technologies and languages they would normally use in their day job. This guide will help you get everything setup for both the customer and mentorship teams.

> **IMPORTANT**: Please go through this entire guide in preparing to deliver an event. Ping @GeekTrainer with any questions.
## Running a workshop

> - [Setup](./setup.md)
> - [Workshop flow](./workshop-flow.md)
## Background

Because GitHub Copilot is a coding tool, we wanted to provide a scenario which resembles "real world" as best as can be done in a workshop. We identified the following criteria:

- A set of challenges which can be completed within a few hours.
- A challenge flexible enough to allow for multiple languages to be available for learners to use.
- Something which has enough substance for learners to build, explore, and use real-world techniques and strategies.

To support this style, we've created a workshop in the style of a hackathon. Learners are given a set of [challenges](./content/) based around a [dataset with US flight information](../data/). The "green path" involves learners creating a model to predict the chance a flight will be delayed more than 15 minutes based on the day of the week and the destination, export the model and a list of airports to expose as an API, and a frontend for users to access the mode.

Learners are given the freedom to solve them how they see fit. While [solutions](./possible-solution/) are provided, there isn't a single "right answer." Each challenge puts forth a core requirement to be completed before moving to the next one, with suggestions on possible side quests they could pursue if they wish to dig further into a particular area.

## Requirements

To run the workshop, a customer will need to have access to GitHub Copilot and a development environment.

### GitHub Copilot

Given that the workshop is built to allow developers to gain experience with GitHub Copilot, they will need to have access to GitHub Copilot. Specifically, they'll need access to code completion and chat. Other workloads are nice to have, but not required to successfully complete the workshop.

### Development environment

Developers will also need an environment in which to code. To streamline the process, [a dev container](https://code.visualstudio.com/docs/devcontainers/containers) has been [built](./.devcontainer) which includes Anaconda, Postgres, Node.js and .NET. Learners are of course free to install any additional languages, frameworks and services they desire. If they are using Visual Studio Code (local or in-browser), it will also automatically install the extensions for GitHub Copilot and GitHub Copilot Chat.
38 changes: 38 additions & 0 deletions admin/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# Repository structure and preparation

## Repository structure

The repository contains the following key folders:

- [content](../content/): The content to support learners through the workshop.
- [data](../data/): The container for the CSV file the learners will use for the project.
- [possible-solution]: A possible solution for the workshop. Learners can use this to "catch up" or bypass challenges. It's built using Python for the model, Flask for the API, and Svelte for the front end.

## Setting up the repository

The base repository is private for Hubbers to be able to build upon and learn from. To make the repository available for customers:

1. [Create a new repository from the template](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnew%3Fowner%3Dgithubcustomers%26template_name%3Dcopilot-hack%26template_owner%3Dgithub).
1. Select **GitHubCustomers** as the owner of the new repository, or an organization the customer has access to.
1. Provide a new name for the repository, such as **_customer-name_-copilot-hack**.
1. Set the visibility as **Private** or **Internal**.
1. Create the repository.
1. Delete the [admin](../admin) folder as it's not needed for the event.
1. If needed, grant access to the customer to the repository if it is hosted on **GitHubCustomers**.

> **IMPORTANT**: Do not mark the visibility of the repository as public
## Prebuilding the codespace

Because the container can take several minutes to build, you should [create a prebuild](https://docs.github.com/en/codespaces/prebuilding-your-codespaces) which will allow learners to open the dev environment within seconds.

1. Navigate to **Settings** > **Codespaces**.
1. Select **Set up prebuild**.
1. Select **main** for the branch.
1. Select **Reduce prebuild availability to only specific regions** and ensure the regions appropriate for the customer are selected.
1. Add your handle to the list for **Failure notifications**.
1. Leave default values for the remainder of the settings unless you desire a different configuration.
1. Select **Create**.

The image will be created and cached, and become available for learners for the event.
31 changes: 31 additions & 0 deletions admin/workshop-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Workshop flow

The workshop is built to take roughly a day. Learners may move through the core challenges relatively quickly, but are encouraged to take the time to explore side quests, creating additional features.

## Suggested schedule

The workshop is built in a way which it could be completely self-guided. However, regular touch points should be scheduled to ensure learners are actively engaged. This can be done by using the schedule below, and potential solutions can be presented by Hubbers or fellow learners.

Attention should be paid to ensure learners know mentors are available to answer their questions. If the event is IRL, mentors should walk around the room. For virtual events, a periodic message in the discussion channel can help spark conversation.

| Time | Content |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 08:00 - 09:00 | Welcome and [GitHub Copilot overview presentation](https://docs.google.com/presentation/d/1eoH-BNhqopnl9IcwZpvH6bwLIw5V4lGK9EXN2396Ubk/edit?usp=sharing) |
| 09:00 - 11:00 | Learners hack, getting their environments setup and working through the challenges |
| 11:00 - 11:30 | Present a possible solution for creating and exporting the model, and tips about getting support from GitHub Copilot |
| 11:30 - 12:30 | Lunch |
| 12:30 - 2:00 | Learners hack, working on the second challenge of creating the API |
| 2:00 - 2:30 | Present a possible solution for creating the API, and tips about getting support from GitHub Copilot |
| 2:30 - 4:30 | Learners hack, working on the third challenge, creating the frontend |
| 4:30 - 5:00 | Present a possible solution for creating the frontend, and close with best practices for using GitHub Copilot, and a CTA to install the extension and begin using it |

## Mentor preparation

Mentors are expected to be able to support learners as they explore the challenges and build their solutions. Learners are allowed to use the languages and frameworks they desire, and are encouraged to follow their imagination. They will also have questions about GitHub Copilot, use cases, and about how to best use the tooling. While you do not need to be an expert in every possible approach, the following steps will help prepare you for supporting the event:

1. Complete the [workshop](../content/0-get-started.md) on your own, using the approach which feels most comfortable for you based on your experience. If you like your solution, you can create a PR to include it as a model for learners.
1. Explore [best practices for prompt crafting](https://github.blog/2023-06-20-how-to-write-better-prompts-for-github-copilot/).
1. Be ready for the most common questions you will receive from attendees:

- Does GitHub Copilot use my code to retrain the model? (No, the round-trip of context and suggestions is ephemeral, with no information stored.)
- Does GitHub Copilot read my entire project? (No, it uses the tabs open in your IDE, starting with the ones closest to the file you are currently working on.)

0 comments on commit 99e516d

Please sign in to comment.