最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Container (Apptainer) as interpreter in VSCode - Stack Overflow

programmeradmin0浏览0评论

I want to use my apptainer container as Python interpreter for VS Code. I have this bash script saved (named "python"):

#!/bin/bash

# load required modules
...

apptainer exec my_image.sif /app/bin/python "$@"

While I can run it from the cmd e.g. via ./python --version which correctly starts the container and returns the Python version from inside it, VS Code seems to interpret it wrong. I specified "python.defaultInterpreterPath": "/path/to/python"in the settings.json, selected it but when I run it from VS Code, I am getting this error:

/app/bin/python: No such file or directory

Do you know what might be the problem and how I can get VS Code to correctly interpret my container ?

发布评论

评论列表(0)

  1. 暂无评论