# Conda run\_env in custom docker image for Kuberay

**URL:** <https://discuss.ray.io/t/conda-run-env-in-custom-docker-image-for-kuberay/14153>\
**Category:** Kubernetes\
**Created:** [March 25, 2024, 10:24pm UTC](https://discuss.ray.io/t/conda-run-env-in-custom-docker-image-for-kuberay/14153 "2024-03-25T22:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spcdmaa](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@spcdmaa](https://discuss.ray.io/u/spcdmaa)\
**Post date:** [March 25, 2024, 10:24pm UTC](https://discuss.ray.io/t/conda-run-env-in-custom-docker-image-for-kuberay/14153/1 "2024-03-25T22:24:11Z")

</div>

I created a custom docker image with the following:

* * *

FROM rayproject/ray:2.10.0-py310

WORKDIR /dock

COPY conda.yml .

RUN conda env create -f conda.yml

* * *

Now when I run the following (note that I am kubectl port-forward to my cluster head service):

ray.init(address=“ray://localhost:10001/”, runtime\_env={“conda”: “myenv”})

I get this:

Traceback (most recent call last):  
File “/home/ray/anaconda3/lib/python3.10/site-packages/ray/util/client/server/proxier.py”, line 719, in Datapath  
raise RuntimeError(  
RuntimeError: Proxy failed to Connect to backend! Check `ray_client_server.err` and `ray_client_server_23009.err` on the head node of the cluster for the relevant logs. By default these are located at /tmp/ray/session\_latest/logs.

I do not get this error when running with runtime\_env and can use the cluster as long as I dont utilize any dependencies in remote functions.

Not sure if I’m going about this the wrong way, but my assumption was that specifying the conda env name would activate for all future compute…
