1
- ARG PYTHON_VERSION=3.10
1
+ ARG PYTHON_VERSION=3.12
2
2
FROM mcr.microsoft.com/devcontainers/python:${PYTHON_VERSION}
3
3
4
- # Install Node.js and Yarn
5
- RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
6
- apt-get install -y nodejs
4
+ # Install UV and Deno
5
+ RUN curl -fsSL https://deno.land/install.sh | sh
6
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
7
+ RUN uv python pin $PYTHON_VERSION
8
+ # create python virtual environment
9
+ RUN uv venv /opt/venv --python $PYTHON_VERSION --seed
10
+ # Add venv, deno to PATH for subsequent RUN commands and for the container environment
11
+ ENV PATH="/opt/venv/bin:/root/.deno/bin:$PATH"
7
12
8
13
# Setup working directory
9
14
WORKDIR /workspace
10
15
11
16
# --- Python Server App Dependencies ---
12
- # Create Python virtual environment
13
- RUN python3 -m venv /opt/venv
14
- # Add venv to PATH for subsequent RUN commands and for the container environment
15
- ENV PATH="/opt/venv/bin:${PATH}"
16
-
17
17
# Copy files required for Python dependency installation.
18
18
COPY pyproject.toml README.md ./
19
19
@@ -26,15 +26,15 @@ ENV PIP_EXTRA_INDEX_URL="https://download.pytorch.org/whl/cpu https://abetlen.gi
26
26
VERSION=0.0.0
27
27
# Install Python dependencies from pyproject.toml in editable mode
28
28
RUN sed -i "s/dynamic = \\ [\" version\"\\ ]/version = \" $VERSION\" /" pyproject.toml && \
29
- pip install --no-cache-dir ".[dev]"
29
+ uv sync --all-extras && \
30
+ chown -R vscode:vscode /opt/venv
30
31
31
32
# --- Web App Dependencies ---
32
33
# Copy web app manifest files
33
- COPY src/interface/web/package.json src/interface/web/yarn .lock /tmp/web/
34
+ COPY src/interface/web/package.json src/interface/web/deno.json src/interface/web/deno .lock /tmp/web/
34
35
35
36
# Install web app dependencies
36
- # note: yarn will be available from the "features" in devcontainer.json
37
- RUN yarn install --cwd /tmp/web --cache-folder /opt/yarn-cache
37
+ RUN cd /tmp/web && deno install
38
38
39
39
# The .venv and node_modules are now populated in the image.
40
40
# The rest of the source code will be mounted by VS Code from your local checkout,
0 commit comments