Skip to content

Commit 55c2963

Browse files
authored
Merge branch 'conda-forge:main' into main
2 parents 704974b + 22943a5 commit 55c2963

File tree

7 files changed

+103
-9
lines changed

7 files changed

+103
-9
lines changed

.ci_scripts/update_docs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ make html SPHINXOPTS="-W --keep-going -n"
3333
linkcheck_failed=0
3434
make linkcheck > /dev/null || linkcheck_failed=1
3535
python ../.ci_scripts/display_linkcheck.py _build/linkcheck/output.json
36-
test "$linkcheck_failed" -eq 0
36+
37+
if [[ "${GHREF}" != "refs/heads/main" ]]; then
38+
test "$linkcheck_failed" -eq 0
39+
fi
40+
3741
mv _build/html ../docs
3842
rm -rf _build
3943
popd

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
shell: bash -l {0}
3030
run: |
3131
source ./.ci_scripts/update_docs
32+
env:
33+
GHREF: ${{ github.ref }}
3234

3335
- name: deploy
3436
if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')

css/theme.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,3 +416,9 @@ body {
416416
max-width: 100%;
417417
height: auto;
418418
}
419+
420+
/* https://stackoverflow.com/a/25517025 */
421+
.vcenter {
422+
display: flex;
423+
align-items: center;
424+
}

index.html.tmpl

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1">
99
<meta name="description" content="">
1010
<meta name="author" content="">
11-
11+
1212
<link rel="shortcut icon" href="img/favicon.ico">
1313

1414
<title>conda-forge | community driven packaging for conda</title>
@@ -121,6 +121,28 @@
121121
each repository, also known as a feedstock, automatically
122122
builds its own recipe in a clean and repeatable way on Windows, Linux and OSX.
123123
</p>
124+
</div>
125+
</div>
126+
127+
<div class="row vcenter" style="display: none;" id="stats1">
128+
<div class="col-md-4 col-md-offset-2 padded">
129+
<p class="text-center" id="stats-downloads"></p>
130+
</div>
131+
<div class="col-md-4 padded">
132+
<p class="text-center" id="stats-members"></p>
133+
</div>
134+
</div>
135+
<div class="row vcenter" style="display: none;" id="stats2">
136+
<div class="col-md-4 col-md-offset-2 padded">
137+
<p class="text-center" id="stats-data"></p>
138+
</div>
139+
<div class="col-md-4 padded">
140+
<p class="text-center" id="stats-issues-prs"></p>
141+
</div>
142+
</div>
143+
144+
<div class="row">
145+
<div class="col-lg-8 col-lg-offset-2 padded">
124146
<p>
125147
The built distributions are uploaded to <a href="http://anaconda.org/conda-forge">anaconda.org/conda-forge</a>
126148
and can be <a href="http://conda.pydata.org/docs/intro.html">installed with conda</a>. For example, to install a
@@ -261,6 +283,9 @@
261283
The build and upload processes take place in the feedstock, and once complete the package will be available on the conda-forge channel.</li>
262284
</ul>
263285
</p>
286+
<p>
287+
Please consider joining our <a href="https://gitter.im/conda-forge/conda-forge.github.io">Gitter</a> channel if you want to ask something, need help, or just want to chat with our maintainers. We would love to see you there!
288+
</p>
264289
</div>
265290
</div>
266291
</div>
@@ -394,6 +419,9 @@
394419
<!-- Custom Theme JavaScript -->
395420
<script src="js/theme.js"></script>
396421

422+
<!-- stats -->
423+
<script src="js/stats.js"></script>
424+
397425
</body>
398426

399427
</html>

js/stats.js

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function loadStatsJSON (url, callback) {
2+
var xobj = new XMLHttpRequest()
3+
xobj.overrideMimeType('application/json')
4+
xobj.open('GET', url, true)
5+
xobj.onreadystatechange = function () {
6+
if (xobj.readyState === 4 && xobj.status === 200) {
7+
// Required use of an anonymous callback as .open will NOT return a value
8+
// but simply returns undefined in asynchronous mode
9+
callback(xobj.responseText)
10+
}
11+
}
12+
xobj.send(null)
13+
}
14+
15+
function displayStatsJSON (reportText) {
16+
var stats = JSON.parse(reportText)
17+
18+
var div = document.getElementById('stats-downloads')
19+
var mlns = stats.downloads.month / 1e6
20+
var blns = stats.downloads.all / 1e9
21+
div.innerHTML = (
22+
mlns.toFixed(0) + ' million monthly downloads<br>' +
23+
blns.toFixed(1) + ' billion all-time downloads'
24+
)
25+
26+
div = document.getElementById('stats-members')
27+
div.innerHTML = (
28+
stats.n_members_core + ' core devs<br>' +
29+
stats.n_members_staged_recipes + ' staged-recipes maintainers<br>' +
30+
(stats.n_members / 1e3).toFixed(1) + 'k feedstock maintainers'
31+
)
32+
33+
div = document.getElementById('stats-data')
34+
div.innerHTML = (
35+
(stats.n_repos / 1e3).toFixed(1) + 'k feedstocks<br>' +
36+
(stats.n_packages / 1e3).toFixed(1) + 'k packages<br>' +
37+
(stats.n_artifacts / 1e3).toFixed(0) + 'k artifacts'
38+
)
39+
40+
div = document.getElementById('stats-issues-prs')
41+
div.innerHTML = (
42+
((stats.n_prs + stats.n_issues) / 1e3).toFixed(1) + 'k issues+PRs<br>' +
43+
((stats.n_open_prs + stats.n_open_issues) / 1e3).toFixed(1) + 'k/' +
44+
((stats.n_closed_prs + stats.n_closed_issues) / 1e3).toFixed(1) + 'k open/closed'
45+
)
46+
47+
div = document.getElementById('stats1')
48+
div.style.display = ''
49+
div = document.getElementById('stats2')
50+
div.style.display = ''
51+
}
52+
53+
var url = 'https://raw.githubusercontent.com/conda-forge/by-the-numbers/main/data/live_counts.json'
54+
loadStatsJSON(url, displayStatsJSON)

src/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
todo_include_todos = True
113113

114114
# ---- Options for link validation --------
115+
user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0'
115116

116117
anchor_check_fps = [
117118
r'https://conda-forge.org/status/#armosxaddition$',

src/user/tipsandtricks.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,22 +137,21 @@ To verify that the correct platform is being used, run the following commands af
137137
Installing CUDA-enabled packages like TensorFlow and PyTorch
138138
============================================================
139139

140-
In conda-forge, some packages are available with GPU support. These packages not only take significantly longer to compile and build, but they also result in rather large binaries that users then download. As an effort to maximize accessibility for users with lower connection and/or storage bandwidth, there is an ongoing effort to limit installing packages compiled for GPUs unnecessarily on CPU-only machines by default. This is accomplished by adding a run dependency, ``__cuda``, that detects if the local machine has a GPU. However, this introduces challenges to users who may prefer to still download and use GPU-enabled packages even on a non-GPU machine. For example, login nodes on HPCs often do not have GPUs and their compute counterparts with GPUs often do not have internet access. In this case, a user can override the default setting via the environment variable ``CONDA_CUDA_OVERRIDE`` to install GPU packages on the login node to be used later on the compute node. At the time of writing (February 2022), we have concluded this safe default behavior is best for most of conda-forge users, with an easy override option available and documented. Please let us know if you have thoughts on or issues with this.
140+
In conda-forge, some packages are available with GPU support. These packages not only take significantly longer to compile and build, but they also result in rather large binaries that users then download. As an effort to maximize accessibility for users with lower connection and/or storage bandwidth, there is an ongoing effort to limit installing packages compiled for GPUs unnecessarily on CPU-only machines by default. This is accomplished by adding a run dependency, ``__cuda``, that detects if the local machine has a GPU. However, this introduces challenges to users who may prefer to still download and use GPU-enabled packages even on a non-GPU machine. For example, login nodes on HPCs often do not have GPUs and their compute counterparts with GPUs often do not have internet access. In this case, a user can override the default setting via the environment variable ``CONDA_OVERRIDE_CUDA`` to install GPU packages on the login node to be used later on the compute node. At the time of writing (February 2022), we have concluded this safe default behavior is best for most of conda-forge users, with an easy override option available and documented. Please let us know if you have thoughts on or issues with this.
141141

142-
In order to override the default behavior, a user can set the environment variable ``CONDA_CUDA_OVERRIDE`` like below to install TensorFlow with GPU support even on a machine with CPU only.
142+
In order to override the default behavior, a user can set the environment variable ``CONDA_OVERRIDE_CUDA`` like below to install TensorFlow with GPU support even on a machine with CPU only.
143143

144144
.. code-block:: shell
145145
146-
CONDA_CUDA_OVERRIDE="11.2" conda install "tensorflow==2.7.0=cuda112*" -c conda-forge
146+
CONDA_OVERRIDE_CUDA="11.2" conda install "tensorflow==2.7.0=cuda112*" -c conda-forge
147147
# OR
148-
CONDA_CUDA_OVERRIDE="11.2" mamba install "tensorflow==2.7.0=cuda112*" -c conda-forge
148+
CONDA_OVERRIDE_CUDA="11.2" mamba install "tensorflow==2.7.0=cuda112*" -c conda-forge
149149
150150
.. note::
151151

152-
Note that you should select the cudatoolkit version most appropraite for your GPU; currently, we have "10.2", "11.0", "11.1", and "11.2" builds available, where the "11.2" builds are compatible with all cudatoolkits>=11.2. (At the time of writing, there seems to be a bug in how the cuda builds are resolved by mamba, defaulting to cudatoolkit==10.2; thus, it is prudent to be as explicit as possible like above or by adding ``cudatoolkit>=11.2`` or similar to the line above.)
153-
154-
For context, installing TensorFlow 2.7.0 with ``CONDA_CUDA_OVERRIDE="11.2" mamba install "tensorflow==2.7.0=cuda*" -c conda-forge`` results in approximately 2 GB of packages to download while ``CONDA_CUDA_OVERRIDE="11.2" mamba install "tensorflow=2.7.0=cpu*" -c conda-forge`` results in approximately 200 MB to download. That is a significant bandwidth and storage wasted if one only needs the ``-cpu`` variant!
152+
You should select the cudatoolkit version most appropriate for your GPU; currently, we have "10.2", "11.0", "11.1", and "11.2" builds available, where the "11.2" builds are compatible with all cudatoolkits>=11.2. At the time of writing (Mar 2022), there seems to be a bug in how the CUDA builds are resolved by ``mamba``, defaulting to ``cudatoolkit==10.2``; thus, it is prudent to be as explicit as possible like above or by adding ``cudatoolkit>=11.2`` or similar to the line above.
155153

154+
For context, installing the TensorFlow 2.7.0 CUDA-enabled variant, ``tensorflow==2.7.0=cuda*``, results in approximately 2 GB of packages to download while the CPU variant, ``tensorflow=2.7.0=cpu*``, results in approximately 200 MB to download. That is a significant bandwidth and storage wasted if one only needs the CPU only variant!
156155

157156
.. _pypy:
158157

0 commit comments

Comments
 (0)