Closed Abhishekghosh1998 closed 9 months ago
Is host IPC actually needed? Are you trying to use a GPU?
Most people have used node scheduling constraints and that has worked for them. https://docs.openfaas.com/reference/profiles/#use-tolerations-and-affinity-to-separate-workloads
/set title: Request for CUDA access
@alexellis Yes, I was trying to use the GPU with OpenFaaS. I tried to use the Kubernetes Webhook
idea you gave me. I am not sure whether host IPC
is required or not. However, the pointers which you gave, I shall look into it. Thanks for the same.
If you want to use a GPU, I don't believe you need host IPC. I've never had someone say they needed it, and a number of people have used GPUs before.
Make sure docker-nvidia or containerd-nvidia is properly configured then use a scheduling constraint.
My actions before raising this issue
Why do you need this? I need it for my personal use.
Who is this for? I am Grad student.
Expected Behaviour
I have a use case that requires a container to interact with the base operating system for interprocess communication. I can achieve that using the
--ipc=host
option in thedocker run
command.For example:
docker run -it --ipc=host my_custom_image:latest
I have packaged the required code in a Dockerfile (for OpenFaas, using the Dockerfile template). The code works fine for basic functionality, but it fails when I need to communicate with the host os.
On a Kubernetes cluster, I tried to achieve the same functionality of using the
hostIPC
namespace as follows:I am not sure, but since OpenFaaS uses Dockerfile to build the image of the function to run, and then pushes it to the registry and then deploys it, I guess during the deployment or function triggering, it executes a command like
docker run
or Kubernetes pod creation.I want to add that
--ipc=host
to thisdocker run
command which spawns the container for the function. Or something equivalent tospec: hostIPC: true
as in the pod description .yml file.Can you help me with how this functionality can be achieved? Any specific field in the
stack.yml
file to deploy the function?For example, I have the following stack yml file for a function named![image](https://github.com/openfaas/faas/assets/43134757/9b1b8798-7156-4b8b-9749-492d3b480990)
print-1
:What field to add in the above yml file so that the deployment for pod in kubernetes shows![image](https://github.com/openfaas/faas/assets/43134757/70766419-53de-4f0b-b4ba-ef2eeb84cbe7)
spec: hostIPC: true
:Current Behaviour
Are you a GitHub Sponsor (Yes/No?)
Check at: https://github.com/sponsors/openfaas
List All Possible Solutions and Workarounds
Which Solution Do You Recommend?
Steps to Reproduce (for bugs)
1. 2. 3. 4.
Context
## Your EnvironmentFaaS-CLI version ( Full output from:
faas-cli version
): 0.16.10Docker version
docker version
(e.g. Docker 17.0.05 ): 24.0.2Are you using OpenFaaS on Kubernetes or faasd? I am using OpenFaaS on a Kubernetes cluster created by
kind
utilityOperating System and version (e.g. Linux, Windows, MacOS): Linux 5.15.0-76-generic
Code example or link to GitHub repo or gist to reproduce problem:
Other diagnostic information / logs from troubleshooting guide