Skip to content

Commit d23928b

Browse files
committed
Migrate Anaconda/Miniconda references to Miniforge and conda-forge across docs, workflows, and Docker assets
1 parent f605539 commit d23928b

File tree

11 files changed

+87
-97
lines changed

11 files changed

+87
-97
lines changed

.github/workflows/run-unittests-py310-py311.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
timeout-minutes: 60
9090
shell: bash
9191
env:
92-
CONDA_PREFIX: /usr/share/miniconda
92+
CONDA_PREFIX: /usr/share/miniforge
9393
run: |
9494
set -x # print commands that are executed
9595

.github/workflows/run-unittests-py39-cov-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
timeout-minutes: 60
8484
shell: bash
8585
env:
86-
CONDA_PREFIX: /usr/share/miniconda
86+
CONDA_PREFIX: /usr/share/miniforge
8787
run: |
8888
set -x # print commands that are executed
8989

README-development.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
The Oracle Accelerated Data Science (ADS) SDK used by data scientists and analysts for
55
data exploration and experimental machine learning to democratize machine learning and
6-
analytics by providing easy-to-use,
6+
analytics by providing easy-to-use,
77
performant, and user-friendly tools that
88
brings together the best of data science practices.
99

@@ -53,16 +53,16 @@ for development and testing purposes.
5353

5454
### Step 1: Create a conda environment
5555

56-
Install Anaconda from `https://repo.continuum.io/miniconda/` for the operating system you are using.
56+
Install Miniforge from `https://github.com/conda-forge/miniforge` for the operating system you are using.
5757

5858
In the terminal client, enter the following where <yourenvname> is the name you want to call your environment,
5959
and set the Python version you want to use. ADS SDK requires Python >=3.8.
6060

6161
```bash
62-
conda create -n <yourenvname> python=3.8 anaconda
62+
conda create -n <yourenvname> -c conda-forge python=3.8
6363
```
6464

65-
This installs the Python version and all the associated anaconda packaged libraries at `path_to_your_anaconda_location/anaconda/envs/<yourenvname>`
65+
This installs the Python version and associated packages from conda-forge at `path_to_your_conda_location/envs/<yourenvname>`
6666

6767
### Step 2: Activate your environment
6868

@@ -168,14 +168,14 @@ These are the steps to run the AQUA (AI Quick Actions) API Server for developmen
168168

169169
### Step 1: Requirements
170170
+ Complete the [Getting Started](#getting-started) Section above, create a conda environment with python >3.9 or 3.10
171-
+ install any Rest API Client in your IDE (Thunder Client on [vscode](https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client) or Postman)
171+
+ install any Rest API Client in your IDE (Thunder Client on [vscode](https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client) or Postman)
172172
+ Activate the conda environment from the Getting Started Section and run
173173

174174
```
175175
pip install -r test-requirements.txt
176176
```
177177

178-
### Step 2: Create local .env files
178+
### Step 2: Create local .env files
179179
Running the local JupyterLab server requires setting OCI authentication, proxy, and OCI namespace parameters. Adapt this .env file with your specific OCI profile and OCIDs to set these variables.
180180

181181
```
@@ -186,17 +186,17 @@ HTTP_PROXY=""
186186
HTTPS_PROXY=""
187187
OCI_ODSC_SERVICE_ENDPOINT="your_service_endpoint"
188188
AQUA_SERVICE_MODELS_BUCKET="service-managed-models"
189-
AQUA_TELEMETRY_BUCKET_NS=""
190-
PROJECT_COMPARTMENT_OCID="ocid1.compartment.oc1.<your_ocid>"
189+
AQUA_TELEMETRY_BUCKET_NS=""
190+
PROJECT_COMPARTMENT_OCID="ocid1.compartment.oc1.<your_ocid>"
191191
OCI_CONFIG_PROFILE="your_oci_profile_name"
192192
OCI_IAM_TYPE="security_token" # no modification needed if using token-based auth
193193
TENANCY_OCID="ocid1.tenancy.oc1.<your_ocid>"
194194
AQUA_JOB_SUBNET_ID="ocid1.subnet.oc1.<your_ocid>"
195-
ODSC_MODEL_COMPARTMENT_OCID="ocid1.compartment.oc1.<your_ocid>"
195+
ODSC_MODEL_COMPARTMENT_OCID="ocid1.compartment.oc1.<your_ocid>"
196196
PROJECT_OCID="ocid1.datascienceproject.oc1.<your_ocid>"
197197
```
198198

199-
### Step 3: Add the run_ads.sh script in the ADS Repository
199+
### Step 3: Add the run_ads.sh script in the ADS Repository
200200
+ add the shell script below and .env file from step 2 to your local directory of the cloned ADS Repository
201201
+ Run ```chmox +x run_ads.sh``` after you create this script.
202202
```
@@ -220,10 +220,10 @@ fi
220220
"$@"
221221
```
222222

223-
### Step 4: Run the JupyterLab Server
223+
### Step 4: Run the JupyterLab Server
224224
We can start the JupyterLab server using the following command
225225

226-
```
226+
```
227227
./run_ads.sh jupyter lab --no-browser --ServerApp.disable_check_xsrf=True
228228
```
229229
+ run ```pkill jupyter-lab``` to kill the JupyterLab server and re-run server to reflect changes made locally to the AQUA API
@@ -244,7 +244,7 @@ GET http://localhost:8888/aqua/deployments # calling the deployment_handler.py
244244
Handlers can be found [here](https://github.com/oracle/accelerated-data-science/tree/21ba00b95aef8581991fee6c7d558e2f2b1680ac/ads/aqua/extension).
245245

246246
### Step 5: Run the unit tests for the AQUA API
247-
All the unit tests can be found [here](https://github.com/oracle/accelerated-data-science/tree/main/tests/unitary/with_extras/aqua).
247+
All the unit tests can be found [here](https://github.com/oracle/accelerated-data-science/tree/main/tests/unitary/with_extras/aqua).
248248
The following commands detail how the unit tests can be run.
249249
```
250250
# Run all tests in AQUA project

ads/opctl/distributed/cmds.py

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf-8; -*-
32

4-
# Copyright (c) 2022, 2023 Oracle and/or its affiliates.
3+
# Copyright (c) 2022, 2026 Oracle and/or its affiliates.
54
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
65

76
import json
@@ -198,23 +197,16 @@ def update_ini(tag, registry, dockerfile, source_folder, config, nobuild):
198197
config.get("spec", {}).get("cluster", {}).get("spec", {}).get("image")
199198
)
200199

201-
if tag is not None:
200+
if tag is not None or img_name.startswith("@"):
202201
tag1 = tag
202+
elif len(img_name.rsplit(":", 1)) == 1:
203+
tag1 = "latest"
203204
else:
204-
if img_name.startswith("@"):
205-
tag1 = tag
206-
else:
207-
if len(img_name.rsplit(":", 1)) == 1:
208-
tag1 = "latest"
209-
else:
210-
tag1 = img_name.rsplit(":", 1)[1]
211-
if registry is not None:
205+
tag1 = img_name.rsplit(":", 1)[1]
206+
if registry is not None or img_name.startswith("@"):
212207
registry1 = registry
213208
else:
214-
if img_name.startswith("@"):
215-
registry1 = registry
216-
else:
217-
registry1 = img_name.rsplit(":", 1)[0]
209+
registry1 = img_name.rsplit(":", 1)[0]
218210

219211
if os.path.isfile(ini_file):
220212
ini.read(ini_file)
@@ -238,11 +230,10 @@ def update_ini(tag, registry, dockerfile, source_folder, config, nobuild):
238230
raise ValueError("registry arg is missing")
239231
if dockerfile is not None:
240232
ini.set("main", "dockerfile", dockerfile)
233+
elif nobuild:
234+
ini.set("main", "dockerfile", "DUMMY_PATH")
241235
else:
242-
if nobuild:
243-
ini.set("main", "dockerfile", "DUMMY_PATH")
244-
else:
245-
raise ValueError("dockerfile arg is missing")
236+
raise ValueError("dockerfile arg is missing")
246237
if source_folder is not None:
247238
ini.set("main", "source_folder", source_folder)
248239
else:
@@ -411,7 +402,7 @@ def run_cmd(cmd):
411402
"""
412403
proc = run_command(cmd)
413404
if proc.returncode != 0:
414-
raise RuntimeError(f"Docker build failed.")
405+
raise RuntimeError("Docker build failed.")
415406
return 1
416407

417408

@@ -444,14 +435,14 @@ def horovod_cmd(code_mount, oci_key_mount, config):
444435
"OCI_IAM_TYPE=api_key",
445436
"--rm",
446437
"--entrypoint",
447-
"/miniconda/envs/env/bin/horovodrun",
438+
"/miniforge/envs/env/bin/horovodrun",
448439
config["spec"]["cluster"]["spec"]["image"],
449440
"--gloo",
450441
"-np",
451442
"2",
452443
"-H",
453444
"localhost:2",
454-
"/miniconda/envs/env/bin/python",
445+
"/miniforge/envs/env/bin/python",
455446
config["spec"]["runtime"]["spec"]["entryPoint"],
456447
]
457448
return command
@@ -534,7 +525,7 @@ def dask_cmd(code_mount, oci_key_mount, config):
534525
config["spec"]["cluster"]["spec"]["image"],
535526
"-c",
536527
"(nohup dask-scheduler >scheduler.log &) && (nohup dask-worker localhost:8786 >worker.log &) && "
537-
"/miniconda/envs/daskenv/bin/python "
528+
"/miniforge/envs/daskenv/bin/python "
538529
+ config["spec"]["runtime"]["spec"]["entryPoint"],
539530
]
540531
return command
@@ -592,7 +583,7 @@ def tensorflow_cmd(code_mount, oci_key_mount, config):
592583
'TF_CONFIG={"cluster": {"worker": ["localhost:12345"]}, "task": {"type": "worker", "index": 0}}',
593584
"--rm",
594585
"--entrypoint",
595-
"/miniconda/bin/python",
586+
"/miniforge/bin/python",
596587
config["spec"]["cluster"]["spec"]["image"],
597588
config["spec"]["runtime"]["spec"]["entryPoint"],
598589
]
@@ -632,15 +623,15 @@ def local_run(config, ini):
632623
elif config["spec"]["cluster"]["kind"].lower() == "tensorflow":
633624
command = tensorflow_cmd(code_mount, oci_key_mount, config)
634625
else:
635-
raise RuntimeError(f"Framework not supported")
626+
raise RuntimeError("Framework not supported")
636627
try:
637628
command += [str(arg) for arg in config["spec"]["runtime"]["spec"]["args"]]
638629
except KeyError:
639630
pass
640631
print("Running: ", " ".join(command))
641632
proc = run_command(command)
642633
if proc.returncode != 0:
643-
raise RuntimeError(f"Failed to run local")
634+
raise RuntimeError("Failed to run local")
644635
return 1
645636

646637

@@ -683,22 +674,21 @@ def verify_and_publish_image(nopush, config):
683674
"""
684675
if not nopush:
685676
publish_image_cmd(config["spec"]["cluster"]["spec"]["image"])
686-
else:
687-
if not verify_image(config["spec"]["cluster"]["spec"]["image"]):
688-
print(
689-
"\u26A0 Image: "
690-
+ config["spec"]["cluster"]["spec"]["image"]
691-
+ " does not exist in registry"
677+
elif not verify_image(config["spec"]["cluster"]["spec"]["image"]):
678+
print(
679+
"\u26a0 Image: "
680+
+ config["spec"]["cluster"]["spec"]["image"]
681+
+ " does not exist in registry"
682+
)
683+
print("In order to push the image to registry enter Y else N ")
684+
inp = input("[Y/N]\n")
685+
if inp == "Y":
686+
print("\u2705 pushing image to registry")
687+
publish_image_cmd(config["spec"]["cluster"]["spec"]["image"])
688+
else:
689+
raise RuntimeError(
690+
"Stopping the execution as image doesn't exist in OCI registry"
692691
)
693-
print("In order to push the image to registry enter Y else N ")
694-
inp = input("[Y/N]\n")
695-
if inp == "Y":
696-
print("\u2705 pushing image to registry")
697-
publish_image_cmd(config["spec"]["cluster"]["spec"]["image"])
698-
else:
699-
raise RuntimeError(
700-
"Stopping the execution as image doesn't exist in OCI registry"
701-
)
702692
return 1
703693

704694

ads/opctl/docker/Dockerfile.job

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ RUN chown -R $DATASCIENCE_USER /opt
6262

6363
USER $DATASCIENCE_USER
6464
WORKDIR /home/datascience
65-
ARG MINICONDA_VER=23.5.2-0
66-
RUN wget -nv https://repo.anaconda.com/miniconda/Miniconda3-py38_${MINICONDA_VER}-Linux-x86_64.sh -O /home/datascience/Miniconda3.sh \
67-
&& /bin/bash /home/datascience/Miniconda3.sh -f -b -p /opt/conda \
68-
&& rm /home/datascience/Miniconda3.sh \
65+
ARG MINIFORGE_URL=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
66+
RUN wget -nv ${MINIFORGE_URL} -O /home/datascience/Miniforge3.sh \
67+
&& /bin/bash /home/datascience/Miniforge3.sh -f -b -p /opt/conda \
68+
&& rm /home/datascience/Miniforge3.sh \
6969
&& /opt/conda/bin/conda clean -yaf
7070

7171
WORKDIR /
@@ -100,4 +100,4 @@ RUN rm -rf /tmp/*
100100

101101
RUN mkdir -p /etc/datascience/operators
102102

103-
USER datascience
103+
USER datascience

ads/opctl/docker/Dockerfile.job.arm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2023 Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
33

4-
# Used OL8 because miniconda required a higher version of glibc that was unavoidable
4+
# Used OL8 because miniforge required a higher version of glibc that was unavoidable
55
FROM ghcr.io/oracle/oraclelinux:8-slim
66

77
# Configure environment
@@ -66,10 +66,10 @@ RUN chown -R $DATASCIENCE_USER /opt
6666
USER $DATASCIENCE_USER
6767
WORKDIR /home/datascience
6868
# Note in order to run sudo commands as a non root user, you must specify --credential yes if using qemu static to build the image
69-
ARG MINICONDA_VER=23.5.2-0
70-
RUN wget -nv https://repo.anaconda.com/miniconda/Miniconda3-py38_${MINICONDA_VER}-Linux-aarch64.sh -O /home/datascience/Miniconda3.sh \
71-
&& /bin/bash /home/datascience/Miniconda3.sh -f -b -p /opt/conda \
72-
&& rm /home/datascience/Miniconda3.sh \
69+
ARG MINIFORGE_URL=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
70+
RUN wget -nv ${MINIFORGE_URL} -O /home/datascience/Miniforge3.sh \
71+
&& /bin/bash /home/datascience/Miniforge3.sh -f -b -p /opt/conda \
72+
&& rm /home/datascience/Miniforge3.sh \
7373
&& /opt/conda/bin/conda clean -yaf
7474

7575
WORKDIR /

ads/opctl/docker/Dockerfile.job.gpu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ RUN chown -R $DATASCIENCE_USER /opt
107107

108108
USER $DATASCIENCE_USER
109109
WORKDIR /home/datascience
110-
ARG MINICONDA_VER=23.5.2-0
111-
RUN wget -nv https://repo.anaconda.com/miniconda/Miniconda3-py38_${MINICONDA_VER}-Linux-x86_64.sh -O /home/datascience/Miniconda3.sh \
112-
&& /bin/bash /home/datascience/Miniconda3.sh -f -b -p /opt/conda \
113-
&& rm /home/datascience/Miniconda3.sh \
110+
ARG MINIFORGE_URL=https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
111+
RUN wget -nv ${MINIFORGE_URL} -O /home/datascience/Miniforge3.sh \
112+
&& /bin/bash /home/datascience/Miniforge3.sh -f -b -p /opt/conda \
113+
&& rm /home/datascience/Miniforge3.sh \
114114
&& /opt/conda/bin/conda clean -yaf
115115

116116
WORKDIR /

ads/opctl/docker/operator/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ RUN \
1010
rm -rf /var/cache/yum/*
1111

1212
########################### CONDA INSTALLATION ########################################
13-
RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh >> miniconda.sh
14-
RUN bash ./miniconda.sh -b -p /miniconda; rm ./miniconda.sh;
15-
ENV PATH="/miniconda/bin:$PATH"
13+
RUN curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh >> miniforge.sh
14+
RUN bash ./miniforge.sh -b -p /miniforge; rm ./miniforge.sh;
15+
ENV PATH="/miniforge/bin:$PATH"
1616

1717
USER root
1818

@@ -23,7 +23,7 @@ ARG RND
2323

2424
COPY ./${CONDA_ENV_FILE} /opt/env.yaml
2525
RUN conda install conda-forge::mamba && mamba env create -f /opt/env.yaml --name ${CONDA_ENV_NAME} && conda clean -afy
26-
ENV PATH="/miniconda/envs/${CONDA_ENV_NAME}}/bin:$PATH"
26+
ENV PATH="/miniforge/envs/${CONDA_ENV_NAME}}/bin:$PATH"
2727

2828
RUN conda init bash && source ~/.bashrc && conda activate ${CONDA_ENV_NAME}
2929

ads/opctl/docker/operator/Dockerfile.gpu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ RUN CUDNN_DOWNLOAD_SUM=7eaec8039a2c30ab0bc758d303588767693def6bf49b22485a2c00bf2
5454
ldconfig
5555

5656
########################### CONDA INSTALLATION ########################################
57-
RUN curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh >> miniconda.sh
58-
RUN bash ./miniconda.sh -b -p /miniconda; rm ./miniconda.sh;
59-
ENV PATH="/miniconda/bin:$PATH"
57+
RUN curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh >> miniforge.sh
58+
RUN bash ./miniforge.sh -b -p /miniforge; rm ./miniforge.sh;
59+
ENV PATH="/miniforge/bin:$PATH"
6060

6161
USER root
6262

@@ -67,7 +67,7 @@ ARG RND
6767

6868
COPY ./${CONDA_ENV_FILE} /opt/env.yaml
6969
RUN conda install conda-forge::mamba && mamba env create -f /opt/env.yaml --name ${CONDA_ENV_NAME} && conda clean -afy
70-
ENV PATH="/miniconda/envs/${CONDA_ENV_NAME}}/bin:$PATH"
70+
ENV PATH="/miniforge/envs/${CONDA_ENV_NAME}}/bin:$PATH"
7171

7272
RUN conda init bash && source ~/.bashrc && conda activate ${CONDA_ENV_NAME}
7373

docs/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Setup Conda.
66

7-
Download the latest Miniconda installer for your machine from here: https://docs.conda.io/en/latest/miniconda.html#latest-miniconda-installer-links
7+
Download the latest Miniforge installer for your machine from here: https://github.com/conda-forge/miniforge
88

99
For example for linux you can run the script below:
1010

1111
```bash
12-
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o Miniconda3-latest-Linux-x86_64.sh
13-
bash Miniconda3-latest-Linux-x86_64.sh
12+
curl https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -o Miniforge3-Linux-x86_64.sh
13+
bash Miniforge3-Linux-x86_64.sh
1414
```
1515

1616
Create conda environment.
@@ -57,4 +57,4 @@ zip -r ads-latest.zip docs_html/.
5757

5858
## Contribute
5959

60-
Now you can make updates to the docs and contributed via PRs.
60+
Now you can make updates to the docs and contributed via PRs.

0 commit comments

Comments
 (0)