Local development and testing
Pinecone Local is an in-memory Pinecone Vector Database emulator available as a Docker image.
This page shows you how to use Pinecone Local to develop and test your applications locally or in a CI (continuous integration) pipeline without connecting to a Pinecone cloud account or incurring usage or storage fees.
Pinecone Local is suitable only for local development and testing. Records loaded into Pinecone Local do not persist after it is stopped. See Limitations and Unsupported features for details.
Pinecone Local is in early access.
Before you begin
-
Make sure Docker is installed and running on your local machine.
-
Pinecone Local works with Python SDK
v4.1.2
or later, Node.js SDKv3.0.x
or later, Java SDKv2.1.0
or later, and Go SDKv1.1.1
or later.If you are using an older SDK version, upgrade to the latest version as follows:
1. Start Pinecone Local
Copy the following code to a file and save it as docker-compose.yaml
:
In this file, each service defines an index that Pinecone Local will create on startup. For each index, update the environment variables as needed:
PORT
: Specify the port number for the index to listen on.INDEX_TYPE
: Specify the type of Pinecone index to create. Accepted values:serverless
orpod
.DIMENSION
: Specify the dimension of vectors you will store in the index.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values:cosine
,euclidean
, ordot-product
.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index, including the port it listens on:
2. Develop and test your app
Reading and writing data to Pinecone Local works the same as when using a Pinecone cloud account. However, note the following differences:
-
Pinecone Local does not authenticate client requests. No API key is required for Go and curl. For Python, Node, and Java, an API key must be passed, but the value does not matter.
-
To target an index, you must specify its host and port number. It is not possible to target an index by name.
Be sure to review the limitations and unsupported features of Pinecone Local before using it for development and testing.
Example
3. Stop Pinecone Local
Pinecone Local is an in-memory emulator. Records loaded into Pinecone Local do not persist after Pinecone Local is stopped.
To stop and remove the Docker containers for Pinecone Local, run the following command:
Limitations
Pinecone Local has the following limitations:
- Pinecone Local is available only as a Docker image.
- Pinecone Local is an in-memory emulator and is not suitable for production. Records loaded into Pinecone Local do not persist after it is stopped.
- Pinecone Local does not authenticate client requests. API keys are ignored.
- Pinecone Local is based on the
2024-07
stable API. There are no Pinecone Local versions for other versions of the API. - Max number of records per index: 100,000
Unsupported features
Pinecone Local does not currently support the following features:
- Control plane operations (e.g.,
create_index
,configure_index
, etc.) - Sparse vector values
- Bulk import
- Backups and collections
- Pinecone Inference
- Pinecone Assistant
Was this page helpful?