Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ ENV NEXT_TELEMETRY_DISABLED=1
RUN NODE_ENV=production npm run build

FROM python:3.11-slim AS py_deps
WORKDIR /app
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY api/requirements.txt ./api/
RUN pip install --no-cache -r api/requirements.txt
WORKDIR /api
COPY api/pyproject.toml .
COPY api/poetry.lock .
RUN python -m pip install poetry==2.0.1 --no-cache-dir && \
poetry config virtualenvs.create true --local && \
poetry config virtualenvs.in-project true --local && \
poetry config virtualenvs.options.always-copy --local true && \
POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \
poetry cache clear --all .

# Use Python 3.11 as final image
FROM python:3.11-slim
Expand Down Expand Up @@ -64,7 +68,7 @@ RUN if [ -n "${CUSTOM_CERT_DIR}" ]; then \
ENV PATH="/opt/venv/bin:$PATH"

# Copy Python dependencies
COPY --from=py_deps /opt/venv /opt/venv
COPY --from=py_deps /api/.venv /opt/venv
COPY api/ ./api/

# Copy Node app
Expand Down
16 changes: 10 additions & 6 deletions Dockerfile-ollama-local
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ COPY --exclude=./api . .
RUN NODE_ENV=production npm run build

FROM python:3.11-slim AS py_deps
WORKDIR /app
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
COPY api/requirements.txt ./api/
RUN pip install --no-cache -r api/requirements.txt
WORKDIR /api
COPY api/pyproject.toml .
COPY api/poetry.lock .
RUN python -m pip install poetry==2.0.1 --no-cache-dir && \
poetry config virtualenvs.create true --local && \
poetry config virtualenvs.in-project true --local && \
poetry config virtualenvs.options.always-copy --local true && \
POETRY_MAX_WORKERS=10 poetry install --no-interaction --no-ansi --only main && \
poetry cache clear --all .

FROM python:3.11-slim AS ollama_base
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -68,7 +72,7 @@ RUN apt-get update && apt-get install -y \
ENV PATH="/opt/venv/bin:$PATH"

# Copy Python dependencies
COPY --from=py_deps /opt/venv /opt/venv
COPY --from=py_deps /api/.venv /opt/venv
COPY api/ ./api/

# Copy Node app
Expand Down
2 changes: 1 addition & 1 deletion Ollama-instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ cp api/config/embedder.ollama.json.bak api/config/embedder.json

Start the backend:
```bash
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install
python -m api.main
```

Expand Down
2 changes: 1 addition & 1 deletion README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Instalar dependencias de Python
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Iniciar el servidor API
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ OLLAMA_HOST=votre_hote_ollama

```bash
# Installer dépendances Python
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Démarrer le serveur API
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Pythonの依存関係をインストール
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# APIサーバーを起動
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.kr.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Python 의존성 설치
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# API 서버 실행
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ OLLAMA_HOST=your_ollama_host

```bash
# Install Python dependencies
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Start the API server
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ OLLAMA_HOST=seu_host_ollama

```bash
# Instale as dependências Python
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Inicie o servidor API
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ OLLAMA_HOST=ваш_ollama_host

```bash
# Установка зависимостей
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Запуск API
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.vi.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# Cài đặt Python dependencies
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# Chạy API server
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ OLLAMA_HOST=your_ollama_host

```bash
# 安裝 Python 相依性
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# 啟動 API 伺服器
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ OPENROUTER_API_KEY=your_openrouter_api_key

```bash
# 安装Python依赖
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install

# 启动API服务器
python -m api.main
Expand Down
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This is the backend API for DeepWiki, providing smart code analysis and AI-power

```bash
# From the project root
pip install -r api/requirements.txt
python -m pip install poetry==2.0.1 && poetry install
```

### Step 2: Set Up Environment Variables
Expand Down
Loading