-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement distributed training using Kubernetes #77
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1bdb814
Add initial Dockerfile and k8s deployment
leogao2 05f4dcf
Fix imports
leogao2 6e9b3a8
Update dockerfile
leogao2 a0b4748
Merge branch 'main' of github.com:EleutherAI/gpt-neox into k8s
leogao2 206b8ca
Add /dev/shm patch
leogao2 2a578d2
Update to be completely passwordless
leogao2 d48f48a
Add host file generation script
leogao2 032fde1
Make deploy script
leogao2 81f1ef4
Update deploy script and fix echo -e problem
leogao2 ee1739e
Remove command line argument
leogao2 af90891
Generate keys for worker machines
leogao2 dcd11ae
Harden security slightly
leogao2 e682f7f
Update docker for custom keygen
leogao2 8a26b7e
Fix ssh
leogao2 0e36734
Fix deploy script to use right id
leogao2 480dc36
Added logging config
StellaAthena 221d73a
Update README.md
StellaAthena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Add initial Dockerfile and k8s deployment
- Loading branch information
commit 1bdb8141517ebd6f207588c266326200ce2c7455
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,15 @@ | ||
FROM atlanticcrypto/cuda-ssh-server:10.2-cudnn | ||
|
||
RUN echo 'AuthorizedKeysFile .ssh/authorized_keys' >> /etc/ssh/sshd_config && \ | ||
apt-get update && \ | ||
apt-get install -y git python3.8 python3.8-dev python3-pip sudo && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \ | ||
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \ | ||
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 | ||
|
||
RUN mkdir -p ~/.ssh && \ | ||
echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChClBdh2UXpMhBV725nH1bMsGVaLmYAp8uMZFHtBqHN56sj/35jeenQTqr/Tov3u6xwqJK+rxegjgcPDZfuOSdsNnTMCLIacA/WqBMwW1mjdMc+zFOub7vQJHj4nmeF3pd4tSjt720ZLiX1ZsF5QrTIcnURAXT0/82SKIy2nqj18v9HCcIvBplexJU3SlVg+oWk/e5CsfnXvJMQH3VqJaeyrXIlaFgVOvVWSBY66Kc2H+g1RxLwe+BONyNanxSXxKHQwUXawBvXIyjekapB3HiNWLZZfZjNmqe2Ci+Y9PKn0CrkgXopIP7tVKn+UQ2fD3nSjaZyfRrmcFgXdotFKJh root@sshd-sid-79b6f9d7c6-mmw8x' > ~/.ssh/authorized_keys | ||
|
||
RUN python3 -m pip install --upgrade pip && \ | ||
pip3 install torch pipx && \ | ||
python3 -m pipx ensurepath |
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,51 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: eleuther-neox | ||
spec: | ||
strategy: | ||
type: Recreate | ||
replicas: 2 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: eleuther-neox | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: eleuther-neox | ||
spec: | ||
terminationGracePeriodSeconds: 10 | ||
containers: | ||
- name: neox | ||
command: ["/usr/sbin/sshd"] | ||
args: ["-D"] | ||
tty: true | ||
image: leogao2/deepspeed_eleuther | ||
ports: | ||
- name: sshd | ||
containerPort: 2222 | ||
protocol: TCP | ||
|
||
resources: | ||
requests: | ||
cpu: 30 | ||
memory: 40Gi | ||
limits: | ||
nvidia.com/gpu: 8 | ||
|
||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
# Edit for different GPU | ||
- key: gpu.nvidia.com/model | ||
operator: In | ||
values: | ||
- GeForce_RTX_2080_Ti | ||
- key: failure-domain.beta.kubernetes.io/region | ||
operator: In | ||
values: | ||
- ORD1 | ||
|
||
restartPolicy: Always |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be
22
as suggested by theEXPOSE
at https://github.com/coreweave/cuda-ssh-server/blob/master/Dockerfile#L37 ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I had thought as well, but Leo and I tested it and it seems to work with 2222. Not sure why / what difference it makes though.