-
Notifications
You must be signed in to change notification settings - Fork 11
Add docker dev setup and update requirements #78
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9258722
Add docker dev setup and update requirements
thecharlieblake 974a257
fix ci yaml bug
thecharlieblake 34121c1
fix UID to work on runner
thecharlieblake c097f89
fix ci locale bug
thecharlieblake ee3ce9d
Fix docs ci bug and update dev docs
thecharlieblake fec4773
fix readme
thecharlieblake fa95e08
Fix readme
thecharlieblake 4e10d87
fix readme
thecharlieblake 78ca891
get docker working with git
thecharlieblake 3fd7fa0
Cleanup documentation
thecharlieblake 7a1f767
Fix ci error
thecharlieblake 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
There are no files selected for viewing
This file contains hidden or 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,21 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"workspaceFolder": "/workspace", | ||
"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=${localWorkspaceFolder},target=/workspace,type=bind" | ||
] | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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) | ||
|
||
# Set working directory | ||
WORKDIR /workspace | ||
|
||
# Install Python dependencies | ||
COPY requirements-dev.txt . | ||
RUN pip install -r requirements-dev.txt | ||
|
||
# Puts pip install libs on $PATH & sets correct locale | ||
ENV PATH="$PATH:/home/$USERNAME/.local/bin" \ | ||
LC_ALL=C.UTF-8 | ||
|
||
# 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 | ||
|
||
# Creates basic .zshrc | ||
RUN sudo cp /etc/zsh/newuser.zshrc.recommended /home/$USERNAME/.zshrc | ||
|
||
CMD ["/bin/zsh"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why zsh, out of interest? Just personal preference? (No objection, just curious.) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
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.
Is this right - I thought it looked like a dir not a command?
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.
It's completely mad! No idea what's going on there. Removed