-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: major improvments to evals, can now aggregate eval_results and …
…run rust+browser+git in Docker (passes evals)
- Loading branch information
Showing
4 changed files
with
101 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
# Use the main Dockerfile as the base image | ||
FROM gptme:latest AS base | ||
|
||
# Set build argument for browser | ||
ARG BROWSER=no | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Switch back to gptme directory (not /workspace) | ||
WORKDIR /app | ||
|
||
# Install rust if enabled | ||
ARG RUST=no | ||
USER appuser | ||
RUN if [ "$RUST" = "yes" ]; then \ | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal; \ | ||
source $HOME/.cargo/env; rustup default stable; \ | ||
fi | ||
ENV PATH="/home/appuser/.cargo/bin:${PATH}" | ||
|
||
# Switch back to root for installations | ||
# Install necessary build tools if rust is enabled | ||
USER root | ||
RUN if [ "$RUST" = "yes" ]; then \ | ||
apt-get update && apt-get install build-essential -y; \ | ||
fi | ||
|
||
# Install playwright if browser is enabled | ||
ARG BROWSER=no | ||
USER root | ||
RUN if [ "$BROWSER" = "yes" ]; then \ | ||
poetry run playwright install chromium; \ | ||
poetry install -E browser --without=dev; \ | ||
poetry run playwright install-deps; \ | ||
su appuser -c "poetry run playwright install chromium"; \ | ||
fi | ||
|
||
WORKDIR /app | ||
|
||
# Create eval_results directory | ||
RUN mkdir ./eval_results; chown appuser:appuser ./eval_results | ||
|
||
# Switch back to non-root user | ||
USER appuser | ||
|
||
RUN git config --global user.name "gptme" | ||
RUN git config --global user.email "[email protected]" | ||
RUN git config --global init.defaultBranch main | ||
|
||
# Add an entry point for running evals | ||
ENTRYPOINT ["poetry", "run", "python", "-m", "gptme.eval"] |
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
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