Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +20 -4
Dockerfile
CHANGED
|
@@ -100,8 +100,19 @@ RUN wget -q https://github.com/conda-forge/miniforge/releases/latest/download/Mi
|
|
| 100 |
&& bash /tmp/m.sh -b -p /opt/conda \
|
| 101 |
&& rm /tmp/m.sh \
|
| 102 |
&& /opt/conda/bin/conda clean -afy
|
| 103 |
-
|
| 104 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
RUN mamba create -y -n LinkOrgs_env python=3.11 pip && \
|
| 106 |
/opt/conda/envs/LinkOrgs_env/bin/pip install --only-binary=:all: \
|
| 107 |
tensorflow==2.15 \
|
|
@@ -117,8 +128,13 @@ RUN mamba create -y -n LinkOrgs_env python=3.11 pip && \
|
|
| 117 |
tensorflow=2.15 numpy=1.26.4 tensorflow-probability=0.23 \
|
| 118 |
jax=0.4.26 jaxlib=0.4.26 optax=0.2.2 equinox=0.11.4 && \
|
| 119 |
/opt/conda/envs/LinkOrgs_env/bin/pip install jmp==0.0.4 && \
|
| 120 |
-
/opt/conda/bin/conda clean -afy)
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
# ------------------------------------------------------------------------------
|
| 124 |
# App code
|
|
|
|
| 100 |
&& bash /tmp/m.sh -b -p /opt/conda \
|
| 101 |
&& rm /tmp/m.sh \
|
| 102 |
&& /opt/conda/bin/conda clean -afy
|
| 103 |
+
|
| 104 |
+
# After installing Miniforge, add proper conda initialization
|
| 105 |
+
RUN /opt/conda/bin/conda init bash && \
|
| 106 |
+
echo "conda activate base" >> ~/.bashrc
|
| 107 |
+
|
| 108 |
+
# Set more comprehensive conda environment variables
|
| 109 |
+
ENV CONDA_DEFAULT_ENV=LinkOrgs_env \
|
| 110 |
+
CONDA_PREFIX=/opt/conda/envs/LinkOrgs_env \
|
| 111 |
+
CONDA_PYTHON_EXE=/opt/conda/bin/python \
|
| 112 |
+
CONDA_EXE=/opt/conda/bin/conda \
|
| 113 |
+
PATH=/opt/conda/envs/LinkOrgs_env/bin:/opt/conda/bin:$PATH
|
| 114 |
+
|
| 115 |
+
# After creating the environment, ensure it's properly registered
|
| 116 |
RUN mamba create -y -n LinkOrgs_env python=3.11 pip && \
|
| 117 |
/opt/conda/envs/LinkOrgs_env/bin/pip install --only-binary=:all: \
|
| 118 |
tensorflow==2.15 \
|
|
|
|
| 128 |
tensorflow=2.15 numpy=1.26.4 tensorflow-probability=0.23 \
|
| 129 |
jax=0.4.26 jaxlib=0.4.26 optax=0.2.2 equinox=0.11.4 && \
|
| 130 |
/opt/conda/envs/LinkOrgs_env/bin/pip install jmp==0.0.4 && \
|
| 131 |
+
/opt/conda/bin/conda clean -afy) && \
|
| 132 |
+
# Important: Create a conda env config file for reticulate
|
| 133 |
+
echo "/opt/conda/envs/LinkOrgs_env/bin/python" > /opt/conda/envs/LinkOrgs_env/.conda_prefix
|
| 134 |
+
|
| 135 |
+
# Keep RETICULATE_PYTHON but also add RETICULATE_CONDA
|
| 136 |
+
ENV RETICULATE_PYTHON=/opt/conda/envs/LinkOrgs_env/bin/python \
|
| 137 |
+
RETICULATE_CONDA=/opt/conda/bin/conda
|
| 138 |
|
| 139 |
# ------------------------------------------------------------------------------
|
| 140 |
# App code
|