R
Runpod•3w ago
mInrOz

Missing required environment variables: RP_API_KEY and RUNPOD_ENDPOINT_ID

Am I being retarded here? Shouldn't these variables be available within the container?
==========
== CUDA ==
==========
CUDA Version 12.8.1
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
Traceback (most recent call last):
File "/app/api_server.py", line 25, in <module>
raise ValueError(
ValueError: Missing required environment variables: RP_API_KEY and RUNPOD_ENDPOINT_ID
==========
== CUDA ==
==========
CUDA Version 12.8.1
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
Traceback (most recent call last):
File "/app/api_server.py", line 25, in <module>
raise ValueError(
ValueError: Missing required environment variables: RP_API_KEY and RUNPOD_ENDPOINT_ID
From my api_server.py
# Configuration
RP_API_KEY = os.getenv("RP_API_KEY")
RUNPOD_ENDPOINT_ID = os.getenv("RUNPOD_ENDPOINT_ID")
RUNPOD_BASE_URL = f"https://api.runpod.ai/v2/{RUNPOD_ENDPOINT_ID}"

if not RP_API_KEY or not RUNPOD_ENDPOINT_ID:
raise ValueError(
"Missing required environment variables: RP_API_KEY and RUNPOD_ENDPOINT_ID"
)
# Configuration
RP_API_KEY = os.getenv("RP_API_KEY")
RUNPOD_ENDPOINT_ID = os.getenv("RUNPOD_ENDPOINT_ID")
RUNPOD_BASE_URL = f"https://api.runpod.ai/v2/{RUNPOD_ENDPOINT_ID}"

if not RP_API_KEY or not RUNPOD_ENDPOINT_ID:
raise ValueError(
"Missing required environment variables: RP_API_KEY and RUNPOD_ENDPOINT_ID"
)
4 Replies
Unknown User
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
mInrOz
mInrOzOP•2w ago
It should be provided by the env when I deploy a serverless model, so it "should" work imo
Unknown User
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
Dj
Dj•2w ago
It's 100% RUNPOD_API_KEY, can you tell me where you saw an example that referred to it as RP_API_KEY or did you write that 👀

Did you find this page helpful?