michaelfeil / michaelfeil/infinity

Docker Build Error: failed to create task for container: unable to start container process: exec:"v2" executable file not found in $PATH

Open
#534 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.9k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

### **Description**

I'm attempting to build a Docker image that integrates both Infinity and the Stella_400M_v5 model for CPU development. Previously, I ran the Infinity image with a model ID successfully, but now I need a single image that includes both Infinity and the model. However, when I run the container, I encounter errors, most notably:

failed to create task for container: unable to start container process: exec: "v2" executable file not found in $PATH

Additionally, errors indicate that the model ONNX files cannot be found.

### **Steps to Reproduce**

1. Base Image: Start with the Infinity base image (michaelf34/infinity:latest-cpu).
2. Working Directory: Set the working directory to /app.
3. Install Dependencies: Install git and git-lfs to handle large files.
4. Initialize Git LFS: Run git lfs install.
5. Clone Model Repository: Create a /models directory and clone the [Stella_400M_v5 repository](https://huggingface.co/NovaSearch/stella_en_400M_v5) from Hugging Face.
6. Create Cache Directory: Create a cache directory at /app/.cache.
7. Expose Port: Expose port 7997.
8. Entry Point and Command: Set the entry point to Infinity's CLI and attempt to run the model with parameters.

### **Dockerfile**

FROM michaelf34/infinity:latest-cpu
WORKDIR /app
RUN apt-get update && apt-get install -y git git-lfs && rm -rf /var/lib/apt/lists/*
RUN git lfs install
RUN mkdir -p /models && \
cd /models && \
git clone https://huggingface.co/NovaSearch/stella_en_400M_v5
RUN mkdir -p /app/.cache
EXPOSE 7997
ENTRYPOINT ["infinity_emb"]
CMD ["v2", "--engine", "optimum", "--model-id", "/models/stella_en_400M_v5", "--port", "7997"]

### **Expected Behavior**
The Docker image should build without issues.
On running the container, Infinity's CLI should start and correctly load the Stella_400M_v5 model on CPU.

### **Actual Behavior**
The container fails to start with an error:
failed to create task for container: unable to start container process: exec: "v2" executable file not found in $PATH
There are also errors related to missing model ONNX files.(The onnx error stops when I download the onnx files locally from hugging face but the "v2" error remains)

### **Additional Context**
The build is being performed for CPU development.
The Infinity image works correctly when run separately with a model ID, which suggests the issue might be related to how the executable (v2) is specified or how the model files are managed.

### **Request for Assistance**
1. Clarification Needed: Is the error related to the way the executable is specified (i.e., "v2") or might it be an issue with file paths for the model ONNX files? Could there be an issue with the entrypoint or CMD syntax that's preventing execution?
2. Suggestions: Any guidance on adjusting the Dockerfile or entrypoint configuration to successfully build and run the image would be greatly appreciated.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Dockerfile's ENTRYPOINT and CMD configuration, then reproduce the container startup using the listed Infinity image and Stella_400M_v5 model path. Check the reported executable and ONNX-file errors separately. Done means the container starts Infinity and loads the model on CPU through port 7997.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.