From 4c124bc8e520046d3415589fb1dd95d4468988e2 Mon Sep 17 00:00:00 2001 From: xiaoshuisheng Date: Mon, 11 Dec 2023 11:00:58 +0800 Subject: [PATCH] add build_run script --- build.bat | 22 ++++++++++++++++++++++ build_run.bat | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 build.bat create mode 100644 build_run.bat diff --git a/build.bat b/build.bat new file mode 100644 index 000000000..bccbb250e --- /dev/null +++ b/build.bat @@ -0,0 +1,22 @@ +@echo off +setlocal + +set VENV_DIR=venv +set REQUIREMENTS=requirements.txt + +echo Setting up virtual environment... +python -m venv %VENV_DIR% +call %VENV_DIR%\Scripts\activate.bat + +pip3 show torch > nul +if %errorlevel% neq 0 ( + pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 +) + +echo Installing requirements... +pip install -r %REQUIREMENTS% + +echo Setup complete. + +echo Running the application... +call %VENV_DIR%\Scripts\activate.bat diff --git a/build_run.bat b/build_run.bat new file mode 100644 index 000000000..b4799593d --- /dev/null +++ b/build_run.bat @@ -0,0 +1,25 @@ +@echo off +setlocal + +set VENV_DIR=venv +set REQUIREMENTS=requirements.txt + +echo Setting up virtual environment... +python -m venv %VENV_DIR% +call %VENV_DIR%\Scripts\activate.bat + +pip3 show torch > nul +if %errorlevel% neq 0 ( + pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 +) + +echo Installing requirements... +pip install -r %REQUIREMENTS% + +echo Setup complete. + +echo Running the application... +call %VENV_DIR%\Scripts\activate.bat + + +python main.py \ No newline at end of file