Deployment#
Note
Coming Soon — this page is under construction.
Deploy
Deploy your OpenEnv environments to Docker, Hugging Face Spaces, and more.
Docker Deployment#
Building the Image#
cd my_env
docker build -t my-env:latest .
Running Locally#
docker run -p 8000:8000 my-env:latest
Using with OpenEnv CLI#
openenv run my-env:latest
Hugging Face Spaces#
Create a Space#
Go to huggingface.co/new-space
Select “Docker” as the SDK
Upload your environment code
Dockerfile for HF Spaces#
FROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install -e .
EXPOSE 7860
CMD ["uvicorn", "my_env.server:app", "--host", "0.0.0.0", "--port", "7860"]
Connect to Your Space#
from openenv import AutoEnv
env = AutoEnv.from_env("your-username/my-env")
Next Steps#
Environment Anatomy - Understand the structure
CLI Reference - CLI commands for deployment