Publish environments (#120)

This commit is contained in:
Simon Alibert
2024-05-03 16:25:45 +02:00
committed by GitHub
parent b2cda12f87
commit b7b69fcc3d
6 changed files with 43 additions and 177 deletions

View File

@@ -1,30 +0,0 @@
PYPROJECT = "pyproject.toml"
DEPS = {
"gym-pusht": '{ git = "git@github.com:huggingface/gym-pusht.git", optional = true}',
"gym-xarm": '{ git = "git@github.com:huggingface/gym-xarm.git", optional = true}',
"gym-aloha": '{ git = "git@github.com:huggingface/gym-aloha.git", optional = true}',
}
def update_envs_as_path_dependencies():
with open(PYPROJECT) as file:
lines = file.readlines()
new_lines = []
for line in lines:
if any(dep in line for dep in DEPS.values()):
for dep in DEPS:
if dep in line:
new_line = f'{dep} = {{ path = "envs/{dep}/", optional = true}}\n'
new_lines.append(new_line)
break
else:
new_lines.append(line)
with open(PYPROJECT, "w") as file:
file.writelines(new_lines)
if __name__ == "__main__":
update_envs_as_path_dependencies()

View File

@@ -36,38 +36,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
# HACK(aliberts): to be removed for release
# -----------------------------------------
- name: Checkout gym-aloha
uses: actions/checkout@v4
with:
repository: huggingface/gym-aloha
path: envs/gym-aloha
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-xarm
uses: actions/checkout@v4
with:
repository: huggingface/gym-xarm
path: envs/gym-xarm
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-pusht
uses: actions/checkout@v4
with:
repository: huggingface/gym-pusht
path: envs/gym-pusht
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Change envs dependencies as local path
run: python .github/scripts/dep_build.py
# -----------------------------------------
- name: Login to DockerHub
uses: docker/login-action@v3
with:
@@ -130,38 +98,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
# HACK(aliberts): to be removed for release
# -----------------------------------------
- name: Checkout gym-aloha
uses: actions/checkout@v4
with:
repository: huggingface/gym-aloha
path: envs/gym-aloha
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-xarm
uses: actions/checkout@v4
with:
repository: huggingface/gym-xarm
path: envs/gym-xarm
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-pusht
uses: actions/checkout@v4
with:
repository: huggingface/gym-pusht
path: envs/gym-pusht
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Change envs dependencies as local path
run: python .github/scripts/dep_build.py
# -----------------------------------------
- name: Login to DockerHub
uses: docker/login-action@v3
with:

View File

@@ -68,38 +68,6 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
# HACK(aliberts): to be removed for release
# -----------------------------------------
- name: Checkout gym-aloha
uses: actions/checkout@v4
with:
repository: huggingface/gym-aloha
path: envs/gym-aloha
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-xarm
uses: actions/checkout@v4
with:
repository: huggingface/gym-xarm
path: envs/gym-xarm
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Checkout gym-pusht
uses: actions/checkout@v4
with:
repository: huggingface/gym-pusht
path: envs/gym-pusht
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Change envs dependencies as local path
run: python .github/scripts/dep_build.py
# -----------------------------------------
- name: Build Docker image
uses: docker/build-push-action@v5
with:

View File

@@ -28,11 +28,6 @@ jobs:
DATA_DIR: tests/data
MUJOCO_GL: egl
steps:
- name: Add SSH key for installing envs
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v4
- name: Install EGL
@@ -69,11 +64,6 @@ jobs:
DATA_DIR: tests/data
MUJOCO_GL: egl
steps:
- name: Add SSH key for installing envs
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/checkout@v4
- name: Install EGL