Skip to content

Commit 48ee1ad

Browse files
authored
Update Readme: Add dev setup guide for vs code (#143)
1 parent 8be5247 commit 48ee1ad

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,31 @@ docker run -t \
7777
```
7878

7979
in this example, `id\:000000\,sig\:06\,src\:000000\,op\:flip1\,pos\:0` is the file containing the failing input.
80+
81+
## Development Setup Using VS Code
82+
83+
First create a docker container in daemon as your working container (`IMAGE` and `PYTH_REPO` same as above):
84+
85+
```
86+
docker run --name pyth-dev -d \\
87+
--volume "${HOME}:/home/pyth/home" \\
88+
--volume "${HOME}/.config:/home/pyth/.config" \\
89+
--volume "${HOME}/.ssh:/home/pyth/.ssh" \\ # Github access
90+
--mount "type=bind,src=${PYTH_REPO},target=/home/pyth/pyth-client" \\
91+
--platform linux/amd64 \\
92+
$IMAGE \\
93+
/bin/bash -c "while [ true ]; do sleep 1000; done"
94+
```
95+
96+
Default user in the image is `pyth` which may not have access to your directories. Assign your user id and group id to it to enable access.
97+
```
98+
host@host$ id $USER # Shows user_id, group_id, and group names
99+
host@host$ docker exec -ti pyth-dev bash
100+
pyth@pyth-dev$ sudo su
101+
root@pyth-dev# groupadd -g 1004 1004
102+
root@pyth-dev# usermod -u 1002 -g 1004 -s /bin/bash pyth
103+
```
104+
105+
Finally, in docker extension inside VS Code click right and choose "Attach VS Code". If you're using a remote host in VS Code make sure to let this connection be open.
106+
107+
To get best experience from C++ IntelliSense, open entire `/home/pyth` in VS Code to include `solana` directory in home for lookup directories.

0 commit comments

Comments
 (0)