Skip to content

Conversation

@DarshanDeshpande
Copy link
Contributor

@DarshanDeshpande DarshanDeshpande commented Oct 22, 2025

Adds Gitea-based git server environment with task-based isolation. This would be useful for containerized git server access for the agent. The server is shared between different task processes to improve scalability.

It supports

  • Fast iteration across runs: Sub-second resets for RL training loops
  • Shared server + isolated workspaces
  • Environment variables and setting custom configs for gitea

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 22, 2025
@jspisak
Copy link
Contributor

jspisak commented Oct 22, 2025

nice!!

print()

# Create provider and start container with environment variables
provider = LocalDockerProvider()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use GitEnv.from_docker_image("git-env:latest")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires environment variables (and in general, other kwargs) to be supported by the http_env_client.py's from_docker_image method since that starts the container. I will add a kwargs argument and make this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the change. Please let me know if this looks good

&& rm -rf /var/lib/apt/lists/*

# Install smolagents (required by core.tools.PyExecutor, even though git_env doesn't use it directly)
RUN pip install --no-cache-dir smolagents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for this PR but ideally, we should move smolagents a few other basic deps into base image Dockerfile. Do you mind creating an issue or a PR for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I can create an issue for this

fi

# Initialize Gitea (POST to root URL)
echo "3. Initializing Gitea configuration..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to model this as an MCP tool for this env eventually? RFC 004 touches upon this point. WDYT?
cc: @Darktex

@@ -0,0 +1,36 @@
# Dockerfile for Git Environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may add this docker file in the .github/workflows/ here https://github.com/meta-pytorch/OpenEnv/blob/main/.github/workflows/docker-build.yml#L78 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please check

@Rebecca-Qian
Copy link
Contributor

FYI @pankit-eng we don't have write permissions, will let you merge!

@pankit-eng pankit-eng merged commit 623a1d2 into meta-pytorch:main Oct 22, 2025
1 check passed
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.

4 participants