Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 7 additions & 101 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Inspired by
# https://github.com/huggingface/peft/blob/main/.github/workflows/build_docker_images.yml
name: Builds
name: Build and Push Docker Image

on:
workflow_dispatch:
workflow_call:
schedule:
- cron: "0 1 * * *"

Expand All @@ -28,86 +11,9 @@ env:
PYTHON_VERSION: "3.10"

jobs:
latest-cpu:
name: CPU
runs-on:
group: aws-general-8-plus
steps:
- name: Install Git LFS
run: |
sudo apt-get update
sudo apt-get install git-lfs
git lfs install

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
cache-binary: false

- name: Check out code
uses: actions/checkout@v4
with:
lfs: true
persist-credentials: false

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push CPU
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/lerobot-cpu/Dockerfile
push: true
tags: huggingface/lerobot-cpu
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}


latest-cuda:
name: GPU
runs-on:
group: aws-general-8-plus
steps:
- name: Install Git LFS
run: |
sudo apt-get update
sudo apt-get install git-lfs
git lfs install

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
cache-binary: false

- name: Check out code
uses: actions/checkout@v4
with:
lfs: true
persist-credentials: false

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push GPU
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/lerobot-gpu/Dockerfile
push: true
tags: huggingface/lerobot-gpu
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}


latest-cuda-dev:
name: GPU Dev
runs-on:
group: aws-general-8-plus
build-and-push:
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -125,11 +31,11 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push GPU dev
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/lerobot-gpu-dev/Dockerfile
file: ./Dockerfile
push: true
tags: huggingface/lerobot-gpu:dev
tags: TensorAuto/OpenTau:latest
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}
82 changes: 0 additions & 82 deletions .github/workflows/test-docker-build.yml

This file was deleted.

10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y \
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

# Set working directory
WORKDIR /lerobot
WORKDIR /opentau

# Copy project files
COPY . .
Expand All @@ -34,14 +34,10 @@ COPY . .
# We explicitly use the system python 3.10 for the venv
RUN uv venv .venv --python /usr/bin/python3.10 && \
. .venv/bin/activate && \
uv sync --extra tau0 --extra test --extra video_benchmark \
--extra accelerate --extra dev --extra feetech \
--extra openai --extra onnx --extra smolvla \
--extra libero --extra metaworld
uv sync --all-extras

# Set environment variables
ENV PATH="/lerobot/.venv/bin:$PATH"
ENV LEROBOT_HOME="/lerobot"
ENV PATH=".venv/bin:$PATH"

# Default command
CMD ["/bin/bash"]
4 changes: 2 additions & 2 deletions src/opentau/datasets/lerobot_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,8 @@ def __init__(
repo_id (str): This is the repo id that will be used to fetch the dataset. Locally, the dataset
will be stored under root/repo_id.
root (Path | None, optional): Local directory to use for downloading/writing files. You can also
set the LEROBOT_HOME environment variable to point to a different location. Defaults to
'~/.cache/huggingface/lerobot'.
set the HF_OPENTAU_HOME environment variable to point to a different location. Defaults to
'~/.cache/huggingface/opentau'.
episodes (list[int] | None, optional): If specified, this will only load episodes specified by
their episode_index in this list. Defaults to None.
image_transforms (Callable | None, optional): You can pass standard v2 image transforms from
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
from opentau.constants import HF_OPENTAU_HOME

LEROBOT_TEST_DIR = HF_OPENTAU_HOME / "_testing"
OPENTAU_TEST_DIR = HF_OPENTAU_HOME / "_testing"
DUMMY_REPO_ID = "dummy/repo"
DUMMY_ROBOT_TYPE = "dummy_robot"
DUMMY_MOTOR_FEATURES = {
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
STATS_PATH,
TASKS_PATH,
)
from tests.fixtures.constants import LEROBOT_TEST_DIR
from tests.fixtures.constants import OPENTAU_TEST_DIR


@pytest.fixture(scope="session")
Expand Down Expand Up @@ -90,7 +90,7 @@ def _mock_snapshot_download(
**kwargs,
) -> str:
if not local_dir:
local_dir = LEROBOT_TEST_DIR
local_dir = OPENTAU_TEST_DIR

# List all possible files
all_files = []
Expand Down
Loading