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

Merge develop #18

Merged
merged 12 commits into from
Apr 15, 2024
Prev Previous commit
Next Next commit
feat: Add API startup script
hotfix: Integration fix
  • Loading branch information
lehcode committed Apr 14, 2024
commit e804fdab4c30f6547c422ac2573ec1a60364d2ae
3 changes: 0 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ SECURE_MODE=
# NodeJS environment mode. 'development' or 'production'
# Node's default is development if omitted
NODE_ENV=development
# Specify timezone if necessary
TZ=Etc/UTC
#
# NVidia CUDA driver version.
# Will download new image if changed
Expand All @@ -68,4 +66,3 @@ MITMPROXY_DIR=/home/mitmproxy/.mitmproxy
LANG=en_US.UTF-8
# Specify timezone if necessary
TZ=Etc/UTC

3 changes: 1 addition & 2 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ POSTGRES_HOST_PORT=15432
POSTGRES_CONTAINER_PORT=5432
#
# Directories
APP_DIR=/opt/od
UI_DIR=/var/www/od_ui
APP_DIR=/opt/opendevin/app
# Path to ollama models directory at the host machine
HOST_MODELS_DIR=/mnt/g/LLMs/ollama/models
WORKSPACE_DIR=/opt/opendevin/workspace
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ ipython_config.py
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
Expand All @@ -120,13 +120,14 @@ celerybeat.pid
*.sage.py

# Environments
**/*/.env
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
*venv/

# Spyder project settings
.spyderproject
Expand Down Expand Up @@ -196,12 +197,11 @@ logs
.envrc
/workspace
/debug
cache

# configuration
config.toml

.mitmproxy/mitmproxy-*
.ollama/models
.ollama/id_*
/frontend/.husky/
/**/*/.env
Empty file removed .mitmproxy/.gitkeep
Empty file.
Empty file removed .ollama/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
args:
# jupyter_port: ${JUPYTER_PORT:?}
debug: ${DEBUG:-}
conda_dir: ${APP_DIR:?}/.conda
conda_dir: /var/miniconda
nvidia_utils_driver: 550
app_root: ${APP_ROOT:?}
venv_name: ${VENV_NAME:?}
Expand Down
30 changes: 30 additions & 0 deletions docker/devin/ui/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

if [ -n "${DEBUG}" ]; then set -eux; fi

PATH="${PATH}:$yarn_global_root/node_modules/npm/bin:$yarn_global_root/bin"
echo ${PATH}

# Process named arguments
while getopts ":-m:-e:" opt; do
case ${opt} in
-m ) llm_model="$OPTARG";;
-e ) embeddings_model="$OPTARG";;
\? ) echo "Invalid option: $OPTARG" 1>&2; exit 1;;
: ) echo "Invalid option: $OPTARG requires an argument" 1>&2; exit 1;;
esac
done
shift $((OPTIND -1))

# Access named arguments
echo "Default LLM model: $llm_model"
echo "Default Embeddings model: $embeddings_model"

which vite

if [ -n "${DEBUG}" ]; then
vite --config vite.config.js --host 0.0.0.0 --port "${UI_HTTP_PORT:?}" \
--clearScreen false --debug True
else
vite --config vite.config.js --host 0.0.0.0 --port "${UI_HTTP_PORT:?}"
fi
3 changes: 2 additions & 1 deletion docker/devin/web_ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN if [ -n "$debug" ]; then set -eux; fi && \
ARG node_env
ARG node_options
ARG pm_cache_dir=/usr/local/share/.cache/yarn/v6
ARG build_dir
ARG build_dir=/opt/opendevin/build_ui

ENV NODE_ENV="$node_env"
Expand Down Expand Up @@ -103,6 +104,7 @@ RUN --mount=type=cache,target=$pm_cache_dir \
if [ -n "$debug" ]; then set -eux; fi && \
yarn add -P classnames webpack typescript


COPY frontend/vite.config.js $app_dir/vite.config.js

RUN --mount=type=cache,target=$build_dir/dist \
Expand All @@ -113,7 +115,6 @@ RUN --mount=type=cache,target=$build_dir/dist \
yarn cache clean

COPY docker/devin/web_ui/entrypoint.sh /docker-entrypoint.sh

RUN --mount=type=cache,target=$build_dir/dist \
if [ -n "$debug" ]; then set -eux; fi && \
vite build --config vite.config.js --clearScreen false
Expand Down
19 changes: 0 additions & 19 deletions docs/docker-compose.md

This file was deleted.

1 change: 1 addition & 0 deletions frontend/src/services/auth.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import * as jose from "jose";
import { ResFetchToken } from "../types/ResponseType";

Expand Down