Pinecone Local is an in-memory Pinecone emulator available as a Docker image.
This page shows you how to use Pinecone Local to develop your applications locally without connecting to your Pinecone account or incurring usage or storage fees.
Pinecone Local is not suitable for production. See Limitations for details.
This feature is in public preview.
Pinecone Local has the following limitations:
2025-01
API version, which is not the latest stable version.Pinecone Local does not currently support the following features:
You can configure Pinecone Local as an index emulator or database emulator:
Index emulator - This approach uses the pinecone-index
Docker image to create and configure indexes on startup. This is recommended when you want to quickly experiment with reading and writing data without needing to manage the index lifecycle.
With index emulation, you can only read and write data to the indexes created at startup. You cannot create new indexes, list indexes, or run other operations that do not involve reading and writing data.
Database emulator - This approach uses the pinecone-local
Docker image to emulate Pinecone Database more broadly. This is recommended when you want to test your production app or manually create and manage indexes.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for each index that you want Pinecone Local to create on startup, including the pinecone-index
Docker image, the host and port that the index with run on, and other index details:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for each index that you want Pinecone Local to create on startup, including the pinecone-index
Docker image, the host and port that the index with run on, and other index details:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index.
Make sure Docker is installed and running on your local machine.
Download the latest pinecone-index
Docker image:
Start Pinecone Local with one or more indexes:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for Pinecone local, including the pinecone-local
Docker image, the host and port that Pinecone Local will run on and the range of ports that will be available for indexes:
To start Pinecone Local, run the following command:
You’ll see a message with details about the Pinecone Local instance.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for Pinecone local, including the pinecone-local
Docker image, the host and port that Pinecone Local will run on and the range of ports that will be available for indexes:
To start Pinecone Local, run the following command:
You’ll see a message with details about the Pinecone Local instance.
Make sure Docker is installed and running on your local machine.
Download the latest pinecone-local
Docker image:
Start Pinecone Local:
This command defines the host and port that Pinecone Local will run on, as well as the range of ports that will be available for indexes.
Running code against Pinecone Local is just like running code against your Pinecone account, with the following differences:
Pinecone Local does not authenticate client requests. API keys are ignored.
The latest version of Pinecone Local uses Pinecone API version 2025-01
and requires Python SDK v6.x
or later, Node.js SDK v5.x
or later, Java SDK v4.x
or later, Go SDK v3.x
or later, and .NET SDK v3.x
or later.
Be sure to review the limitations of Pinecone Local before using it for development or testing.
Example
The following example assumes that you have started Pinecone Local without indexes. It initializes a client, creates a dense index and a sparse index, upserts records into the indexes, checks their record counts, and queries the indexes.
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 resources for Pinecone Local, run the following command:
When you’re ready to run your application against your Pinecone account, be sure to do the following:
Pinecone Local is an in-memory Pinecone emulator available as a Docker image.
This page shows you how to use Pinecone Local to develop your applications locally without connecting to your Pinecone account or incurring usage or storage fees.
Pinecone Local is not suitable for production. See Limitations for details.
This feature is in public preview.
Pinecone Local has the following limitations:
2025-01
API version, which is not the latest stable version.Pinecone Local does not currently support the following features:
You can configure Pinecone Local as an index emulator or database emulator:
Index emulator - This approach uses the pinecone-index
Docker image to create and configure indexes on startup. This is recommended when you want to quickly experiment with reading and writing data without needing to manage the index lifecycle.
With index emulation, you can only read and write data to the indexes created at startup. You cannot create new indexes, list indexes, or run other operations that do not involve reading and writing data.
Database emulator - This approach uses the pinecone-local
Docker image to emulate Pinecone Database more broadly. This is recommended when you want to test your production app or manually create and manage indexes.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for each index that you want Pinecone Local to create on startup, including the pinecone-index
Docker image, the host and port that the index with run on, and other index details:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for each index that you want Pinecone Local to create on startup, including the pinecone-index
Docker image, the host and port that the index with run on, and other index details:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
To start Pinecone Local, run the following command:
You’ll see a message with details about each index.
Make sure Docker is installed and running on your local machine.
Download the latest pinecone-index
Docker image:
Start Pinecone Local with one or more indexes:
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
or pod
.
VECTOR_TYPE
: Specify the type of vectors you will store in the index. Accepted values: dense
or sparse
.
DIMENSION
: Specify the dimension of vectors you will store in the index.
0
.METRIC
: Specify the distance metric for calculating the similarity between vectors in the index. Accepted values for dense indexes: cosine
, euclidean
, or dotproduct
. Accepted value for sparse indexes: dotproduct
.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for Pinecone local, including the pinecone-local
Docker image, the host and port that Pinecone Local will run on and the range of ports that will be available for indexes:
To start Pinecone Local, run the following command:
You’ll see a message with details about the Pinecone Local instance.
Make sure Docker is installed and running on your local machine.
Create a docker-compose.yaml
file that defines a service for Pinecone local, including the pinecone-local
Docker image, the host and port that Pinecone Local will run on and the range of ports that will be available for indexes:
To start Pinecone Local, run the following command:
You’ll see a message with details about the Pinecone Local instance.
Make sure Docker is installed and running on your local machine.
Download the latest pinecone-local
Docker image:
Start Pinecone Local:
This command defines the host and port that Pinecone Local will run on, as well as the range of ports that will be available for indexes.
Running code against Pinecone Local is just like running code against your Pinecone account, with the following differences:
Pinecone Local does not authenticate client requests. API keys are ignored.
The latest version of Pinecone Local uses Pinecone API version 2025-01
and requires Python SDK v6.x
or later, Node.js SDK v5.x
or later, Java SDK v4.x
or later, Go SDK v3.x
or later, and .NET SDK v3.x
or later.
Be sure to review the limitations of Pinecone Local before using it for development or testing.
Example
The following example assumes that you have started Pinecone Local without indexes. It initializes a client, creates a dense index and a sparse index, upserts records into the indexes, checks their record counts, and queries the indexes.
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 resources for Pinecone Local, run the following command:
When you’re ready to run your application against your Pinecone account, be sure to do the following: