Skip to content

Conversation

@manavgup
Copy link
Owner

Summary

This PR updates the GitHub Actions workflow to use the correct backend Dockerfile (backend/Dockerfile.backend) instead of the outdated Dockerfile.codeengine.

Problem

The workflow was using Dockerfile.codeengine which:

❌ Used poetry install that pulled CUDA PyTorch from poetry.lock (~6-8GB of NVIDIA libraries)
❌ Caused massive Docker image bloat
❌ Led to deployment failures from size and dependency issues

Solution

Changed the workflow to use backend/Dockerfile.backend which:

✅ Parses pyproject.toml directly with pip
✅ Uses CPU-only PyTorch via --extra-index-url https://download.pytorch.org/whl/cpu
✅ Significantly reduces image size (~500MB vs 6-8GB)
✅ Works seamlessly with fixes from PR #642 (transformers[vision] + numpy cleanup)

Before:

file: ./Dockerfile.codeengine

After:

file: ./backend/Dockerfile.backend

Changes

  • .github/workflows/deploy_complete_app.yml (line 215): Updated Dockerfile path to ./backend/Dockerfile.backend

Testing

This fix will be validated in the CI pipeline. Expected behavior:

✅ Builds use correct Dockerfile (backend/Dockerfile.backend)
✅ CPU-only PyTorch (no CUDA libraries)
✅ Smaller image size (~500MB)
✅ Successful deployment (no import errors)
✅ Backend starts correctly with all dependencies

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Deployment fix

Related PRs

This is part of the focused PR strategy to replace PR #641:

Together, these PRs fix 50+ failed deployments over the past 2 days.

Checklist

  • Code follows the style guidelines of this project
  • Change is focused and addresses a single issue
  • Commit message follows conventional commits format
  • No breaking changes introduced
  • CI workflows will validate the change

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…odeengine

This PR updates the GitHub Actions workflow to use the correct backend Dockerfile.

## Problem

The workflow was using `Dockerfile.codeengine` which:
- Used `poetry install` that pulled CUDA PyTorch from poetry.lock (6-8GB NVIDIA libs)
- Caused massive Docker image bloat
- Led to deployment failures

## Solution

Changed the workflow to use `backend/Dockerfile.backend` which:
- Parses `pyproject.toml` directly with pip
- Uses CPU-only PyTorch index `--extra-index-url https://download.pytorch.org/whl/cpu`
- Significantly reduces image size
- Works with the fixes from PR #642 (transformers[vision] + numpy cleanup)

**Before**:
```yaml
file: ./Dockerfile.codeengine
```

**After**:
```yaml
file: ./backend/Dockerfile.backend
```

## Changes

- `.github/workflows/deploy_complete_app.yml` (line 215): Updated Dockerfile path

## Testing

This fix will be validated in the CI pipeline. Expected behavior:

✅ **Builds use correct Dockerfile**: backend/Dockerfile.backend
✅ **CPU-only PyTorch**: No CUDA libraries in image
✅ **Smaller image size**: ~500MB vs 6-8GB
✅ **Successful deployment**: No import errors

## Type of Change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Deployment fix

## Related PRs

This is part of the focused PR strategy to replace PR #641:

- **PR #642**: Backend Docker fixes (transformers[vision] + numpy cleanup)
- **PR #643**: SKIP_AUTH default value fix
- **PR #644** (this PR): Workflow Dockerfile path fix

## Checklist

- [x] Code follows the style guidelines of this project
- [x] Change is focused and addresses a single issue
- [x] Commit message follows conventional commits format
- [x] No breaking changes introduced
- [x] CI workflows will validate the change

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🚀 Development Environment Options

This repository supports Dev Containers for a consistent development environment.

Option 1: GitHub Codespaces (Recommended)

Create a cloud-based development environment:

  1. Click the green Code button above
  2. Select the Codespaces tab
  3. Click Create codespace on fix/workflow-dockerfile-path
  4. Wait 2-3 minutes for environment setup
  5. Start coding with all tools pre-configured!

Option 2: VS Code Dev Containers (Local)

Use Dev Containers on your local machine:

  1. Install Docker Desktop
  2. Install VS Code
  3. Install the Dev Containers extension
  4. Clone this PR branch locally
  5. Open in VS Code and click "Reopen in Container" when prompted

Option 3: Traditional Local Setup

Set up the development environment manually:

# Clone the repository
git clone https://github.com/manavgup/rag_modulo.git
cd rag_modulo
git checkout fix/workflow-dockerfile-path

# Initialize development environment
make dev-init
make dev-build
make dev-up
make dev-validate

Available Commands

Once in your development environment:

make help           # Show all available commands
make dev-validate   # Validate environment setup
make test-atomic    # Run atomic tests
make test-unit      # Run unit tests
make lint          # Run linting

Services Available

When running make dev-up:


This automated message helps reviewers quickly set up the development environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants