diff --git a/.gitignore b/.gitignore index ec1dc31..eb78e0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ build/ dummy/ +thirdparty/ !scripts/build builddir/ conan-deps/ diff --git a/docker/Dockerfile b/Dockerfile similarity index 90% rename from docker/Dockerfile rename to Dockerfile index 28356d9..0001e9e 100644 --- a/docker/Dockerfile +++ b/Dockerfile @@ -25,12 +25,10 @@ ENV CUDA_HOME=/usr/local/cuda-11.8 \ RUN useradd -m -s /bin/bash e_user WORKDIR /EmbodiedGen -COPY . . RUN chown -R e_user:e_user /EmbodiedGen USER e_user -RUN conda create -n embodiedgen python=3.10.13 -y && \ - conda run -n embodiedgen bash install.sh +RUN conda create -n embodiedgen python=3.10.13 -y RUN /opt/conda/bin/conda init bash && \ echo "conda activate embodiedgen" >> /home/e_user/.bashrc diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile.prod b/Dockerfile.prod new file mode 100644 index 0000000..590b2e8 --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,4 @@ +FROM embodiedgen:v0.1.2 +WORKDIR /EmbodiedGen +COPY . . + diff --git a/apps/text_to_3d.py b/apps/text_to_3d.py index 8c9012c..8155935 100644 --- a/apps/text_to_3d.py +++ b/apps/text_to_3d.py @@ -471,4 +471,4 @@ with gr.Blocks(delete_cache=(43200, 43200), theme=custom_theme) as demo: if __name__ == "__main__": - demo.launch(server_port=8082) + demo.launch(server_name="0.0.0.0", server_port=8082) diff --git a/docker.sh b/docker.sh new file mode 100644 index 0000000..fc7f1b0 --- /dev/null +++ b/docker.sh @@ -0,0 +1,26 @@ +IMAGE=wangxinjie/embodiedgen:v0.1.x +CONTAINER=EmbodiedGen-docker-${USER} +docker pull ${IMAGE} +docker run -itd --shm-size="64g" --gpus all --cap-add=SYS_PTRACE \ + --security-opt seccomp=unconfined --privileged --net=host \ + --name ${CONTAINER} ${IMAGE} + +docker exec -it ${CONTAINER} bash + + + +export no_proxy="localhost,127.0.0.1,192.168.48.210,120.48.161.22" +export ENDPOINT="https://llmproxy.d-robotics.cc/v1" +export API_KEY="sk-B8urDShf4TLeruwI3dB8286485Aa4984A722E945F566EfF4" +export MODEL_NAME="azure/gpt-4.1" + + +# start a tmux run in backend +CUDA_VISIBLE_DEVICES=0 nohup python apps/image_to_3d.py > /dev/null 2>&1 & +CUDA_VISIBLE_DEVICES=1 nohup python apps/text_to_3d.py > /dev/null 2>&1 & +CUDA_VISIBLE_DEVICES=2 nohup python apps/texture_edit.py > /dev/null 2>&1 & + +# server_name="0.0.0.0", server_port=10001 +# 120.48.161.22:10001 +# unset http_proxy https_proxy no_proxy ENDPOINT API_KEY MODEL_NAME +# export http_proxy=http://192.168.16.76:18000 https_proxy=http://192.168.16.76:18000 diff --git a/install/install_basic.sh b/install/install_basic.sh index 63d4af4..f40d84e 100644 --- a/install/install_basic.sh +++ b/install/install_basic.sh @@ -5,8 +5,9 @@ source "$SCRIPT_DIR/_utils.sh" PIP_INSTALL_PACKAGES=( "pip==22.3.1" - "torch==2.4.0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cu118" - "xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu118" + "torch==2.4.0+cu121 torchvision==0.19.0+cu121 --index-url https://download.pytorch.org/whl/cu121" + "xformers==0.0.27.post2 --index-url https://download.pytorch.org/whl/cu121" + "flash-attn==2.7.0.post2 --no-build-isolation" "-r requirements.txt --use-deprecated=legacy-resolver" "flash-attn==2.7.0.post2" "utils3d@git+https://github.com/EasternJournalist/utils3d.git@9a4eb15" diff --git a/run_docker.sh b/run_docker.sh new file mode 100644 index 0000000..a361a59 --- /dev/null +++ b/run_docker.sh @@ -0,0 +1,16 @@ +IMAGE=embodiedgen:v0.1.1 +CONTAINER=EmbodiedGen-docker-${USER} +docker pull ${IMAGE} +docker run -itd --shm-size="64g" --gpus all --cap-add=SYS_PTRACE \ + --security-opt seccomp=unconfined --privileged --net=host \ + -v /data1/liy/projects/EmbodiedGen:/EmbodiedGen \ + --name ${CONTAINER} ${IMAGE} + +docker exec -it ${CONTAINER} bash + + + +export no_proxy="localhost,127.0.0.1,192.168.48.210,120.48.161.22" +export ENDPOINT="https://llmproxy.d-robotics.cc/v1" +export API_KEY="sk-B8urDShf4TLeruwI3dB8286485Aa4984A722E945F566EfF4" +export MODEL_NAME="azure/gpt-4.1" \ No newline at end of file diff --git a/thirdparty/TRELLIS b/thirdparty/TRELLIS deleted file mode 160000 index 55a8e81..0000000 --- a/thirdparty/TRELLIS +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 55a8e8164b195bbf927e0978f00e76c835e6011f diff --git a/thirdparty/pano2room b/thirdparty/pano2room deleted file mode 160000 index bbf93ae..0000000 --- a/thirdparty/pano2room +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bbf93ae57086ed700edc6ee445852d4457a9d704