Skip to content

Commit

Permalink
try to activate the *correct* conda env
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 11, 2024
1 parent f42493f commit 75ec40e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ runs:
Write-Output "##############################"
Write-Output $envGithubWorkspace
Write-Output "##############################"
Start-Process powershell -ArgumentList "-File", "${{ github.action_path }}\start-server.ps1", "-GITHUB_WORKSPACE", "`"$envGithubWorkspace`""
Start-Process powershell -ArgumentList "-File", "${{ github.action_path }}\start-server.ps1", "-GITHUB_WORKSPACE", "`"$envGithubWorkspace`"", "-CondaEnv", "`"gha-comfyui-${{ inputs.python_version }}-${{ inputs.torch_version }}`""
- name: '[Win] Check if the server is running'
if: ${{ inputs.os == 'windows' }}
Expand Down
8 changes: 7 additions & 1 deletion start-server.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# start-server.ps1
param (
[String]$GITHUB_WORKSPACE,
[String]$PythonFlags
[String]$PythonFlags,
[String]$CondaEnv
)

# Initialize Conda environment
# TODO: remove hardcoding
echo "Starting Conda"
conda activate "$CondaEnv"

# Start the web server and redirect output to a log file
echo "Running Server"
python "$GITHUB_WORKSPACE/main.py" --force-fp16 *> "$GITHUB_WORKSPACE/application.log"
Expand Down

0 comments on commit 75ec40e

Please sign in to comment.