-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
23 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
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ __pycache__/ | |
.*venv* | ||
_build/ | ||
.tox | ||
build/ | ||
|
||
# Coverage | ||
**/.coverage* | ||
|
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,18 +1,39 @@ | ||
FROM python:3.10-bullseye | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.12-bookworm | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
#################### | ||
# Install Graphite # | ||
#################### | ||
ENV NVM_DIR=$HOME/.nvm | ||
RUN mkdir -p $NVM_DIR | ||
ENV NODE_VERSION=18.2.0 | ||
|
||
# Dev experience | ||
COPY Makefile ./ | ||
COPY dev-requirements.txt ./ | ||
RUN --mount=type=cache,target=/root/.cache/pip make install-dev | ||
RUN pyright . | ||
# Install nvm with node and npm | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \ | ||
&& . $NVM_DIR/nvm.sh \ | ||
&& nvm install $NODE_VERSION \ | ||
&& nvm alias default $NODE_VERSION \ | ||
&& nvm use default | ||
|
||
COPY requirements.txt ./ | ||
RUN --mount=type=cache,target=/root/.cache/pip make install-deps | ||
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules | ||
ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||
|
||
RUN npm install -g @withgraphite/graphite-cli@stable | ||
|
||
########### | ||
# Pyright # | ||
########### | ||
WORKDIR /app | ||
RUN pip install pyright | ||
RUN pyright . | ||
|
||
################ | ||
# Install deps # | ||
################ | ||
COPY pyproject.toml ./ | ||
RUN --mount=type=cache,target=/root/.cache/pip pip install pip install --upgrade .[dev] | ||
|
||
# Ensure pyright builds correctly. | ||
# If run in make validate, it is run in parallel, which breaks its installation. | ||
# Install the entire app | ||
COPY . /app | ||
RUN pip install . | ||
RUN git init |
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.