Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ env/
venv*/
ENV/
env.bak/
sf3d_env/

# Spyder project settings
.spyderproject
Expand Down
Binary file added Vi3W_Tasks_Documentation.pdf
Binary file not shown.
42 changes: 42 additions & 0 deletions installer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import os
import subprocess
import sys


def run_command(command):
"""Helper function to execute system commands."""
try:
subprocess.run(command, shell=True, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
sys.exit(1)

def main():
print("Starting installation...")

if not os.path.exists("sf3d_env"):
print("Creating virtual environment...")
run_command("python -m venv sf3d_env")
else:
print("Virtual environment already exists.")

activate_command = (
".\\sf3d_env\\Scripts\\activate" if os.name == "nt" else "source sf3d_env/bin/activate"
)
print("Activating virtual environment...")
run_command(activate_command)

print("Installing dependencies...")
run_command("pip install -r requirements.txt")

print("Installing local modules...")
run_command("pip install ./uv_unwrapper/")
run_command("pip install ./texture_baker/")

print("Verifying installation...")
run_command("python run.py demo_files/examples/chair1.png --output-dir output/ --device cpu")

print("Installation complete!")

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ huggingface-hub==0.23.4
rembg[gpu]==2.0.57; sys_platform != 'darwin'
rembg==2.0.57; sys_platform == 'darwin'
git+https://github.com/vork/PyNanoInstantMeshes.git@v0.0.3
gpytoolbox==0.2.0
#gpytoolbox==0.2.0
./texture_baker/
./uv_unwrapper/