-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script to verify async indexing configured
- Loading branch information
1 parent
b09e589
commit cf1cffe
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ loguru==0.5.3 | |
seaborn==0.12.2 | ||
h5py==3.11.0 | ||
pandas==2.2.2 | ||
docker==7.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import docker | ||
|
||
def get_env_variables(partial_image_name): | ||
client = docker.from_env() | ||
# List all running containers | ||
containers = client.containers.list() | ||
|
||
# Filter containers where the image name matches the partial name | ||
matching_containers = [ | ||
container for container in containers if partial_image_name in container.image.tags[0] | ||
] | ||
|
||
if not matching_containers: | ||
print(f"No running containers found matching image name: {partial_image_name}") | ||
return | ||
|
||
# Retrieve and print environment variables for each matching container | ||
for container in matching_containers: | ||
print(f"Environment variables for container {container.short_id}:") | ||
exec_result = container.exec_run("env", stdout=True, stderr=True) | ||
print(exec_result.output.decode()) | ||
print("--------------------------------------------") | ||
|
||
# Replace with a partial image name | ||
get_env_variables("weaviate") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import docker | ||
|
||
def get_env_variables(partial_image_name): | ||
client = docker.from_env() | ||
containers = client.containers.list() | ||
|
||
matching_containers = [ | ||
container for container in containers if partial_image_name in container.image.tags[0] | ||
] | ||
|
||
if not matching_containers: | ||
print(f"No running containers found matching image name: {partial_image_name}") | ||
return | ||
|
||
for container in matching_containers: | ||
print(f"Environment variables for container {container.short_id}:") | ||
exec_result = container.exec_run("env", stdout=True, stderr=True) | ||
print(exec_result.output.decode()) | ||
print("--------------------------------------------") | ||
|
||
get_env_variables("weaviate") | ||
|