-
Notifications
You must be signed in to change notification settings - Fork 8
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 #78 from graphcore-research/docker-dev
Add docker dev setup and update requirements
- Loading branch information
Showing
19 changed files
with
127 additions
and
210 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,24 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"workspaceFolder": "/home/developer/unit-scaling", | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { "zsh": { "path": "/bin/zsh" } } | ||
} | ||
} | ||
}, | ||
"mounts": [ | ||
"source=${localEnv:HOME}/.ssh,target=/home/developer/.ssh,type=bind,readonly=true", | ||
"source=${localEnv:HOME}/.gitconfig,target=/home/developer/.gitconfig,type=bind,readonly=true", | ||
"source=${localWorkspaceFolder},target=/home/developer/unit-scaling,type=bind" | ||
], | ||
"remoteUser": "developer" | ||
} |
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,2 @@ | ||
* | ||
!requirements*.txt |
This file was deleted.
Oops, something went wrong.
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
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,39 @@ | ||
# Use PyTorch base image | ||
FROM pytorch/pytorch:latest | ||
|
||
# Install additional dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
vim \ | ||
sudo \ | ||
make \ | ||
g++ \ | ||
zsh \ | ||
&& chsh -s /bin/zsh \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* # cleanup (smaller image) | ||
|
||
# Configure a non-root user with sudo privileges | ||
ARG USERNAME=developer # Change this to preferred username | ||
ARG USER_UID=1001 | ||
ARG USER_GID=$USER_UID | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& echo "$USERNAME ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
USER $USERNAME | ||
|
||
# Set working directory | ||
WORKDIR /home/$USERNAME/unit-scaling | ||
|
||
# Puts pip install libs on $PATH & sets correct locale | ||
ENV PATH="$PATH:/home/$USERNAME/.local/bin" \ | ||
LC_ALL=C.UTF-8 | ||
|
||
# Install Python dependencies | ||
COPY requirements-dev.txt . | ||
RUN pip install -r requirements-dev.txt | ||
|
||
# Creates basic .zshrc | ||
RUN sudo cp /etc/zsh/newuser.zshrc.recommended /home/$USERNAME/.zshrc | ||
|
||
CMD ["/bin/zsh"] |
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
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
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,14 +1,28 @@ | ||
-r requirements.txt | ||
black==24.3.0 | ||
flake8==6.0.0 | ||
isort==5.12.0 | ||
mypy==1.2.0 | ||
myst-parser==1.0.0 | ||
pandas-stubs==2.0.2.230605 | ||
pytest==7.3.1 | ||
pytest-cov==4.0.0 | ||
sphinx==6.2.1 | ||
sphinx-rtd-theme==1.2.0 | ||
transformers==4.38.0 | ||
types-Pygments==2.15.0.0 | ||
types-tabulate==0.9.0.2 | ||
# Look in pytorch-cpu first, then pypi second | ||
--index-url https://download.pytorch.org/whl/cpu | ||
--extra-index-url=https://pypi.org/simple | ||
|
||
# Same as requirements.txt, but with versions locked-in | ||
datasets==3.1.0 | ||
docstring-parser==0.16 | ||
einops==0.8.0 | ||
numpy==2.1.3 | ||
seaborn==0.13.2 | ||
tabulate==0.9.0 | ||
torch==2.5.1+cpu | ||
|
||
# Additional dev requirements | ||
black==24.10.0 | ||
flake8==7.1.1 | ||
isort==5.13.2 | ||
mypy==1.13.0 | ||
myst-parser==4.0.0 | ||
pandas-stubs==2.2.3.241009 | ||
pytest==8.3.3 | ||
pytest-cov==6.0.0 | ||
sphinx==8.1.3 | ||
sphinx-rtd-theme==3.0.1 | ||
transformers==4.46.1 | ||
triton==3.1.0 | ||
types-Pygments==2.18.0.20240506 | ||
types-tabulate==0.9.0.20240106 |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
datasets | ||
docstring-parser | ||
einops | ||
numpy<2.0 | ||
numpy | ||
seaborn | ||
tabulate | ||
torch>=2.2 |
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
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
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
Oops, something went wrong.