Skip to content

Commit

Permalink
Merge branch 'og-develop' into profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen committed Nov 6, 2023
2 parents 39a451f + e5385ed commit f644e62
Show file tree
Hide file tree
Showing 56 changed files with 6,115 additions and 445 deletions.
62 changes: 54 additions & 8 deletions .github/workflows/build-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,67 @@ on:

jobs:
docker:
runs-on: [self-hosted, linux, gpu]
runs-on: ubuntu-latest
steps:
-
name: Check disk space
run: df . -h
-
name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
echo "some directories deleted"
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
echo "some packages purged"
-
name: Check disk space
run: |
df . -h
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Login to NVCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: nvcr.io
username: ${{ secrets.NVCR_USERNAME }}
password: ${{ secrets.NVCR_PASSWORD }}
-
name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
-
name: Metadata for dev Image
id: meta-dev
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
stanfordvl/omnigibson-dev
Expand All @@ -41,7 +80,7 @@ jobs:
-
name: Metadata for prod Image
id: meta-prod
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
stanfordvl/omnigibson
Expand All @@ -50,18 +89,25 @@ jobs:
type=semver,pattern={{version}}
-
name: Build and push dev image
uses: docker/build-push-action@v4
id: build-dev
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
file: docker/dev.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Update prod image Dockerfile with dev image tag
run: |
sed -i "s/omnigibson-dev:latest/omnigibson-dev@${{ steps.build-dev.outputs.digest }}/g" docker/prod.Dockerfile && cat docker/prod.Dockerfile
-
name: Build and push prod image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta-prod.outputs.tags }}
labels: ${{ steps.meta-prod.outputs.labels }}
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/docs.yml

This file was deleted.

21 changes: 1 addition & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,7 @@ concurrency:

jobs:
test:
runs-on: [self-hosted, linux, gpu]
container:
image: stanfordvl/omnigibson-dev:latest
options: --gpus=all --privileged --user=root
env:
DISPLAY: ""
OMNIGIBSON_HEADLESS: 1
volumes:
- /scr/omni-data/datasets:/data
- /usr/share/vulkan/icd.d/nvidia_icd.json:/etc/vulkan/icd.d/nvidia_icd.json
- /usr/share/vulkan/icd.d/nvidia_layers.json:/etc/vulkan/implicit_layer.d/nvidia_layers.json
- /usr/share/glvnd/egl_vendor.d/10_nvidia.json:/usr/share/glvnd/egl_vendor.d/10_nvidia.json
- /scr/omni-data/isaac-sim/cache/ov:/root/.cache/ov:rw
- /scr/omni-data/isaac-sim/cache/pip:/root/.cache/pip:rw
- /scr/omni-data/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
- /scr/omni-data/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
- /scr/omni-data/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
- /scr/omni-data/isaac-sim/config:/root/.nvidia-omniverse/config:rw
- /scr/omni-data/isaac-sim/data:/root/.local/share/ov/data:rw
- /scr/omni-data/isaac-sim/documents:/root/Documents:rw
runs-on: [self-hosted, linux, gpu, dataset-enabled]

defaults:
run:
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

-------

## Need support? Join our Discord!
<a href="https://discord.gg/bccR5vGFEx"><img src="https://discordapp.com/api/guilds/1166422812160966707/widget.png?style=banner3"></a>

-------

## Latest Updates
- [08/04/23] **v0.2.0**: More assets! 600 pre-sampled tasks, 7 new scenes, and many new objects 📈 [[release notes]](https://github.com/StanfordVL/OmniGibson/releases/tag/v0.2.0)

Expand All @@ -22,7 +27,7 @@
* 🤖 Mobile Manipulator Robots with Modular ⚙️ Controllers
* 🌎 OpenAI Gym Interface

Check out [**`OmniGibson`**'s documentation](https://stanfordvl.github.io/OmniGibson/getting_started/installation.html) to get started!
Check out [**`OmniGibson`**'s documentation](https://behavior.stanford.edu/omnigibson/getting_started/installation.html) to get started!

### Citation
If you use **`OmniGibson`** or its assets and models, please cite:
Expand Down
18 changes: 10 additions & 8 deletions docker/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nvcr.io/nvidia/isaac-sim:2022.2.0
FROM nvcr.io/nvidia/isaac-sim:2023.1.0

# Set up all the prerequisites.
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
Expand All @@ -19,7 +19,7 @@ ENV OMNIGIBSON_KEY_PATH /data/omnigibson.key
# Install Mamba (light conda alternative)
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj -C / bin/micromamba
ENV MAMBA_ROOT_PREFIX /micromamba
RUN micromamba create -n omnigibson -c conda-forge python=3.7
RUN micromamba create -n omnigibson -c conda-forge python=3.10
RUN micromamba shell init --shell=bash --prefix=/micromamba

# Make sure isaac gets properly sourced every time omnigibson gets called
Expand All @@ -38,22 +38,24 @@ ENV MAKEFLAGS="-j `nproc`"
RUN micromamba run -n omnigibson micromamba install -c conda-forge boost && \
micromamba run -n omnigibson pip install pyplusplus && \
git clone https://github.com/ompl/ompl.git /ompl && \
mkdir -p /ompl/build/Release
mkdir -p /ompl/build/Release && \
sed -i "s/find_program(PYPY/# find_program(PYPY/g" /ompl/CMakeModules/Findpypy.cmake

# Build and install OMPL
RUN cd /ompl/build/Release && \
# Build and install OMPL
RUN micromamba run -n omnigibson /bin/bash --login -c 'source /isaac-sim/setup_conda_env.sh && (which python > /root/PYTHON_EXEC) && (echo $PYTHONPATH > /root/PYTHONPATH)' && \
cd /ompl/build/Release && \
micromamba run -n omnigibson cmake ../.. \
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \
-DBOOST_ROOT="$CONDA_PREFIX" \
-DPYTHON_EXEC=/micromamba/envs/omnigibson/bin/python3.7 \
-DPYTHONPATH=/micromamba/envs/omnigibson/lib/python3.7/site-packages && \
-DPYTHON_EXEC=$(cat /root/PYTHON_EXEC) \
-DPYTHONPATH=$(cat /root/PYTHONPATH) && \
micromamba run -n omnigibson make -j 4 update_bindings && \
micromamba run -n omnigibson make -j 4 && \
cd py-bindings && \
micromamba run -n omnigibson make install

# Test OMPL
RUN micromamba run -n omnigibson python -c "import ompl"
RUN micromamba run -n omnigibson python -c "from ompl import base"

ENTRYPOINT ["micromamba", "run", "-n", "omnigibson"]

Expand Down
2 changes: 1 addition & 1 deletion docker/prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM stanfordvl/omnigibson-dev
FROM stanfordvl/omnigibson-dev:latest

# Copy over omnigibson source
ADD . /omnigibson-src
Expand Down
52 changes: 0 additions & 52 deletions docker/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,55 +26,6 @@ do
esac
done

ICD_PATH_1="/usr/share/vulkan/icd.d/nvidia_icd.json"
ICD_PATH_2="/etc/vulkan/icd.d/nvidia_icd.json"
LAYERS_PATH_1="/usr/share/vulkan/icd.d/nvidia_layers.json"
LAYERS_PATH_2="/usr/share/vulkan/implicit_layer.d/nvidia_layers.json"
LAYERS_PATH_3="/etc/vulkan/implicit_layer.d/nvidia_layers.json"
EGL_VENDOR_PATH="/usr/share/glvnd/egl_vendor.d/10_nvidia.json"

# Find the ICD file
if [ -e "$ICD_PATH_1" ]; then
ICD_PATH=$ICD_PATH_1
elif [ -e "$ICD_PATH_2" ]; then
ICD_PATH=$ICD_PATH_2
else
echo "Missing nvidia_icd.json file.";
echo "Typical paths:";
echo "- /usr/share/vulkan/icd.d/nvidia_icd.json or";
echo "- /etc/vulkan/icd.d/nvidia_icd.json";
echo "You can google nvidia_icd.json for your distro to find the correct path.";
echo "Consider updating your driver to 525 if you cannot find the file.";
echo "To continue update the ICD_PATH_1 at the top of the run_docker.sh file and retry";
exit;
fi

# Find the layers file
if [ -e "$LAYERS_PATH_1" ]; then
LAYERS_PATH=$LAYERS_PATH_1
elif [ -e "$LAYERS_PATH_2" ]; then
LAYERS_PATH=$LAYERS_PATH_2
elif [ -e "$LAYERS_PATH_3" ]; then
LAYERS_PATH=$LAYERS_PATH_3
else
echo "Missing nvidia_layers.json file."
echo "Typical paths:";
echo "- /usr/share/vulkan/icd.d/nvidia_layers.json";
echo "- /usr/share/vulkan/implicit_layer.d/nvidia_layers.json";
echo "- /etc/vulkan/implicit_layer.d/nvidia_layers.json";
echo "You can google nvidia_layers.json for your distro to find the correct path.";
echo "Consider updating your driver to 525 if you cannot find the file.";
echo "To continue update the LAYERS_PATH_1 at the top of the run_docker.sh file and retry";
exit;
fi

if [ ! -e "$EGL_VENDOR_PATH" ]; then
echo "Missing ${EGL_VENDOR_PATH} file."
echo "(default path: /usr/share/vulkan/icd.d/nvidia_icd.json)";
echo "To continue update the EGL_VENDOR_PATH at the top of the run_docker.sh file and retry";
exit;
fi

# Move directories from their legacy paths.
if [ -e "${DATA_PATH}/og_dataset" ]; then
mv "${DATA_PATH}/og_dataset" "${DATA_PATH}/datasets/og_dataset"
Expand Down Expand Up @@ -117,9 +68,6 @@ docker run \
-e DISPLAY=${DOCKER_DISPLAY} \
-e OMNIGIBSON_HEADLESS=${OMNIGIBSON_HEADLESS} \
-v $DATA_PATH/datasets:/data \
-v ${ICD_PATH}:/etc/vulkan/icd.d/nvidia_icd.json \
-v ${LAYERS_PATH}:/etc/vulkan/implicit_layer.d/nvidia_layers.json \
-v ${EGL_VENDOR_PATH}:/usr/share/glvnd/egl_vendor.d/10_nvidia.json \
-v $DATA_PATH/isaac-sim/cache/kit:/isaac-sim/kit/cache/Kit:rw \
-v $DATA_PATH/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v $DATA_PATH/isaac-sim/cache/pip:/root/.cache/pip:rw \
Expand Down
Loading

0 comments on commit f644e62

Please sign in to comment.