Skip to content

Commit

Permalink
publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Dec 13, 2023
1 parent 6954877 commit 46a52c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion src/utils/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,21 @@ const PythonExeMap = new Map([
['3.12', '/opt/python/cp312-cp312/bin/python3']
])

function getPyExe(pythonVersion: string): string {
let exe = PythonExeMap.get(pythonVersion)
if (exe === undefined) {
const v = pythonVersion.replace('.', '')
exe = `/opt/python/cp${v}-cp${v}/bin/python3`
}
return exe
}

function getPythonExe(pythonVersion: string): string {
const buildEnv: BuildEnv = core.getInput('oneflow-build-env') as BuildEnv
if (buildEnv !== 'manylinux') {
return 'python3'
}
const exe = PythonExeMap.get(pythonVersion)
const exe = getPyExe(pythonVersion)
ok(exe, `python3 version not supported: ${pythonVersion}`)
return exe
}
Expand Down

0 comments on commit 46a52c6

Please sign in to comment.