Skip to content

Commit 51c934d

Browse files
committed
fixed docker ci
1 parent 23d502c commit 51c934d

File tree

6 files changed

+15
-195
lines changed

6 files changed

+15
-195
lines changed
Lines changed: 7 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
15-
# Inspired by
16-
# https://github.com/huggingface/peft/blob/main/.github/workflows/build_docker_images.yml
17-
name: Builds
1+
name: Build and Push Docker Image
182

193
on:
204
workflow_dispatch:
21-
workflow_call:
225
schedule:
236
- cron: "0 1 * * *"
247

@@ -28,86 +11,9 @@ env:
2811
PYTHON_VERSION: "3.10"
2912

3013
jobs:
31-
latest-cpu:
32-
name: CPU
33-
runs-on:
34-
group: aws-general-8-plus
35-
steps:
36-
- name: Install Git LFS
37-
run: |
38-
sudo apt-get update
39-
sudo apt-get install git-lfs
40-
git lfs install
41-
42-
- name: Set up Docker Buildx
43-
uses: docker/setup-buildx-action@v3
44-
with:
45-
cache-binary: false
46-
47-
- name: Check out code
48-
uses: actions/checkout@v4
49-
with:
50-
lfs: true
51-
persist-credentials: false
52-
53-
- name: Login to DockerHub
54-
uses: docker/login-action@v3
55-
with:
56-
username: ${{ secrets.DOCKERHUB_USERNAME }}
57-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
58-
59-
- name: Build and Push CPU
60-
uses: docker/build-push-action@v5
61-
with:
62-
context: .
63-
file: ./docker/lerobot-cpu/Dockerfile
64-
push: true
65-
tags: huggingface/lerobot-cpu
66-
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}
67-
68-
69-
latest-cuda:
70-
name: GPU
71-
runs-on:
72-
group: aws-general-8-plus
73-
steps:
74-
- name: Install Git LFS
75-
run: |
76-
sudo apt-get update
77-
sudo apt-get install git-lfs
78-
git lfs install
79-
80-
- name: Set up Docker Buildx
81-
uses: docker/setup-buildx-action@v3
82-
with:
83-
cache-binary: false
84-
85-
- name: Check out code
86-
uses: actions/checkout@v4
87-
with:
88-
lfs: true
89-
persist-credentials: false
90-
91-
- name: Login to DockerHub
92-
uses: docker/login-action@v3
93-
with:
94-
username: ${{ secrets.DOCKERHUB_USERNAME }}
95-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
96-
97-
- name: Build and Push GPU
98-
uses: docker/build-push-action@v5
99-
with:
100-
context: .
101-
file: ./docker/lerobot-gpu/Dockerfile
102-
push: true
103-
tags: huggingface/lerobot-gpu
104-
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}
105-
106-
107-
latest-cuda-dev:
108-
name: GPU Dev
109-
runs-on:
110-
group: aws-general-8-plus
14+
build-and-push:
15+
name: Build and Push
16+
runs-on: ubuntu-latest
11117
steps:
11218
- name: Set up Docker Buildx
11319
uses: docker/setup-buildx-action@v3
@@ -125,11 +31,11 @@ jobs:
12531
username: ${{ secrets.DOCKERHUB_USERNAME }}
12632
password: ${{ secrets.DOCKERHUB_PASSWORD }}
12733

128-
- name: Build and Push GPU dev
34+
- name: Build and Push
12935
uses: docker/build-push-action@v5
13036
with:
13137
context: .
132-
file: ./docker/lerobot-gpu-dev/Dockerfile
38+
file: ./Dockerfile
13339
push: true
134-
tags: huggingface/lerobot-gpu:dev
40+
tags: TensorAuto/OpenTau:latest
13541
build-args: PYTHON_VERSION=${{ env.PYTHON_VERSION }}

.github/workflows/test-docker-build.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y \
2525
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
2626

2727
# Set working directory
28-
WORKDIR /lerobot
28+
WORKDIR /opentau
2929

3030
# Copy project files
3131
COPY . .
@@ -34,14 +34,10 @@ COPY . .
3434
# We explicitly use the system python 3.10 for the venv
3535
RUN uv venv .venv --python /usr/bin/python3.10 && \
3636
. .venv/bin/activate && \
37-
uv sync --extra tau0 --extra test --extra video_benchmark \
38-
--extra accelerate --extra dev --extra feetech \
39-
--extra openai --extra onnx --extra smolvla \
40-
--extra libero --extra metaworld
37+
uv sync --all-extras
4138

4239
# Set environment variables
43-
ENV PATH="/lerobot/.venv/bin:$PATH"
44-
ENV LEROBOT_HOME="/lerobot"
40+
ENV PATH=".venv/bin:$PATH"
4541

4642
# Default command
4743
CMD ["/bin/bash"]

src/opentau/datasets/lerobot_dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,8 @@ def __init__(
955955
repo_id (str): This is the repo id that will be used to fetch the dataset. Locally, the dataset
956956
will be stored under root/repo_id.
957957
root (Path | None, optional): Local directory to use for downloading/writing files. You can also
958-
set the LEROBOT_HOME environment variable to point to a different location. Defaults to
959-
'~/.cache/huggingface/lerobot'.
958+
set the HF_OPENTAU_HOME environment variable to point to a different location. Defaults to
959+
'~/.cache/huggingface/opentau'.
960960
episodes (list[int] | None, optional): If specified, this will only load episodes specified by
961961
their episode_index in this list. Defaults to None.
962962
image_transforms (Callable | None, optional): You can pass standard v2 image transforms from

tests/fixtures/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
from opentau.constants import HF_OPENTAU_HOME
1616

17-
LEROBOT_TEST_DIR = HF_OPENTAU_HOME / "_testing"
17+
OPENTAU_TEST_DIR = HF_OPENTAU_HOME / "_testing"
1818
DUMMY_REPO_ID = "dummy/repo"
1919
DUMMY_ROBOT_TYPE = "dummy_robot"
2020
DUMMY_MOTOR_FEATURES = {

tests/fixtures/hub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
STATS_PATH,
2626
TASKS_PATH,
2727
)
28-
from tests.fixtures.constants import LEROBOT_TEST_DIR
28+
from tests.fixtures.constants import OPENTAU_TEST_DIR
2929

3030

3131
@pytest.fixture(scope="session")
@@ -90,7 +90,7 @@ def _mock_snapshot_download(
9090
**kwargs,
9191
) -> str:
9292
if not local_dir:
93-
local_dir = LEROBOT_TEST_DIR
93+
local_dir = OPENTAU_TEST_DIR
9494

9595
# List all possible files
9696
all_files = []

0 commit comments

Comments
 (0)