Skip to content

fix: dockerfile copy paths#328

Open
targeted-DK wants to merge 2 commits intometa-pytorch:mainfrom
targeted-DK:fix/dockerfile-copy-paths
Open

fix: dockerfile copy paths#328
targeted-DK wants to merge 2 commits intometa-pytorch:mainfrom
targeted-DK:fix/dockerfile-copy-paths

Conversation

@targeted-DK
Copy link

Summary

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • New environment
  • Refactoring

Alignment Checklist

Before submitting, verify:

  • I have read .claude/docs/PRINCIPLES.md and this PR aligns with our principles
  • I have checked .claude/docs/INVARIANTS.md and no invariants are violated
  • I have run /pre-submit-pr (or bash .claude/hooks/lint.sh and tests) and addressed all issues

RFC Status

  • Not required (bug fix, docs, minor refactoring)
  • RFC exists: #___
  • RFC needed (will create before merge)

Test Plan

Build and verify: docker build -t openenv-base:latest -f src/openenv/core/containers/images/Dockerfile . && docker build -f envs/<env_name>/server/Dockerfile -t <env_name>:latest .

Note: Encountered several environment/linting issues during development; uv sync appears to be missing dependencies (pydantic, ruff) required for the standard test/lint workflow as stated in CONTRIBUTING.md

Claude Code Review

NA

  - Fix src/core/ symlink issue by using src/openenv/core/ (7 files)
  - Fix build context paths for openapp_env and openspiel_env (2 files)
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 26, 2026
@targeted-DK targeted-DK changed the title Fix/dockerfile copy paths fix/dockerfile copy paths Jan 26, 2026
@targeted-DK targeted-DK changed the title fix/dockerfile copy paths fix: dockerfile copy paths Jan 26, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

This PR fixes outdated COPY paths in Dockerfiles that were broken after the repository structure refactoring (commit 0dbaf14 from November 2025). The refactoring moved pyproject.toml from src/core/ to the repository root and reorganized the core package from src/core/ to src/openenv/core/.

Changes:

  • Updated base Dockerfile (src/openenv/core/containers/images/Dockerfile) to copy pyproject.toml from repository root instead of src/core/pyproject.toml
  • Updated 8 environment Dockerfiles to copy from src/openenv/core/ instead of src/core/
  • Fixed openapp_env and openspiel_env Dockerfiles to use explicit paths (envs/<env_name>/) instead of relying on build context

Impact:
These fixes are essential for Docker builds to work. Without them, all Docker image builds for OpenEnv environments would fail with "file not found" errors.

Confidence Score: 5/5

  • This PR is safe to merge with no risks - it only fixes broken file paths in Dockerfiles
  • Score reflects that this is a straightforward bug fix with no logic changes, no security concerns, and no invariant violations. The changes are mechanical path updates that align Dockerfiles with the current repository structure. All paths were verified to exist in the current codebase.
  • No files require special attention - all changes are straightforward path corrections

Important Files Changed

Filename Overview
src/openenv/core/containers/images/Dockerfile Fixed pyproject.toml path from src/core/pyproject.toml to root pyproject.toml to match current repo structure
envs/atari_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/chat_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/connect4_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/dipg_safety_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/finrl_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/git_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/sumo_rl_env/server/Dockerfile Fixed OpenEnv core path from src/core/ to src/openenv/core/ to match current repo structure
envs/openapp_env/server/Dockerfile Fixed COPY paths to use explicit envs/openapp_env/ prefix instead of relying on build context
envs/openspiel_env/server/Dockerfile Fixed COPY paths to use explicit envs/openspiel_env/ prefix instead of relying on build context

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docker as Docker Build
    participant Repo as Repository Root
    participant Base as Base Dockerfile
    participant Env as Environment Dockerfiles

    Note over Dev,Env: Previous Structure (Broken)
    Dev->>Docker: docker build (base image)
    Docker->>Base: COPY src/core/pyproject.toml
    Base-->>Docker: ❌ File not found (moved to root)
    
    Dev->>Docker: docker build (env images)
    Docker->>Env: COPY src/core/ /app/src/core/
    Env-->>Docker: ❌ Directory not found (now src/openenv/core/)

    Note over Dev,Env: New Structure (Fixed in this PR)
    Dev->>Docker: docker build (base image)
    Docker->>Base: COPY pyproject.toml
    Base->>Repo: Read from repository root
    Repo-->>Base: ✓ Found at root level
    Base-->>Docker: ✓ Build successful
    
    Dev->>Docker: docker build (env images)
    Docker->>Env: COPY src/openenv/core/ /app/src/core/
    Env->>Repo: Read from correct path
    Repo-->>Env: ✓ Found at src/openenv/core/
    Env-->>Docker: ✓ Build successful
Loading

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

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant