Skip to content
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

🚑 [HotFix] Fix dev environment for CPU Docker #3160

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
},
"workspaceFolder": "/workspaces/accelerate",
// Need git for VSCode to color code modifications. Only runs when building environment.
"onCreateCommand": "apt-get update && apt-get install -y git && pip install -e '.[dev]'"
"onCreateCommand": "apt-get update && apt-get install -y git make && pip install -e '.[dev]'"
}
3 changes: 2 additions & 1 deletion docker/accelerate-cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ RUN python3 -m pip install --no-cache-dir \
FROM python:3.9-slim AS build-image
COPY --from=compile-image /opt/venv /opt/venv
RUN useradd -ms /bin/bash user
RUN echo "user ALL=(ALL) NOPASSWD: /usr/bin/apt-get, /usr/bin/pip" >> /etc/sudoers
USER user

# Make sure we use the virtualenv
ENV PATH="/opt/venv/bin:$PATH"
CMD ["/bin/bash"]
CMD ["/bin/bash"]