Skip to content

Commit

Permalink
Merge pull request #5 from Geson-anko/fix/devcontainer-setup
Browse files Browse the repository at this point in the history
feat: update Docker configuration and clean up .dockerignore
  • Loading branch information
Geson-anko authored Feb 12, 2025
2 parents 6ef2f15 + fb1b466 commit 912a90e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 186 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Start by removing everything and add just the things we need
*
!src
!CMakeLists.txt
!include
!cmake/
13 changes: 3 additions & 10 deletions bindings/python/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ FROM ubuntu:24.04
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
ENV UV_LINK_MODE=copy

RUN mkdir /workspace
COPY . /workspace/
WORKDIR /workspace/bindings/python
# Shell completion
RUN echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -22,9 +20,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
make \
pkg-config \
git \
&& rm -rf /var/lib/apt/lists/* \
&& uv sync \
# Shell completion
&& echo 'eval "$(uv generate-shell-completion bash)"' >> ~/.bashrc \
# Auto activate venv
&& echo 'source /workspace/bindings/python/.venv/bin/activate' >> ~/.bashrc
&& rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion bindings/python/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"privileged": true,
// Mount the root of the repository so that the C++ code can be built
"workspaceMount": "source=inputtino-python-dev,target=/workspace,type=volume",
"workspaceMount": "source=${localWorkspaceFolder}/../../,target=/workspace,type=bind",
"workspaceFolder": "/workspace/bindings/python",
"mounts": [
"source=uv-cache,target=/root/.cache/uv,type=volume",
Expand Down
175 changes: 0 additions & 175 deletions bindings/python/.dockerignore

This file was deleted.

2 changes: 2 additions & 0 deletions bindings/python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ help: ## Show help

clean: ## Clean autogenerated files
rm -rf dist
rm -rf build
rm -rf .venv
find . -type f -name "*.DS_Store" -ls -delete
find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf
find . | grep -E ".pytest_cache" | xargs rm -rf
Expand Down

0 comments on commit 912a90e

Please sign in to comment.