Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit 044c736

Browse files
committed
Fix: Additional OS X docs from @bnmetp.
1 parent 720fc94 commit 044c736

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

docker/README.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Docker Deployment
33

44
.. TODO
55
6-
See https://github.com/RunestoneInteractive/RunestoneServer/issues/1973 for ideas on how to improve this still-complex problem.
7-
6+
See https://github.com/RunestoneInteractive/RunestoneServer/issues/1973 for ideas on how to improve this still-complex problem. See https://github.com/RunestoneInteractive/RunestoneServer/pull/1977 for OS X problems and fixes.
87
98
.. note::
109

@@ -41,6 +40,7 @@ OS X
4140
^^^^
4241
Open a Terminal. In the Terminal:
4342

43+
#. Edit ``/etc/paths``; add ``/opt/homebrew/bin`` as the first line in that file.
4444
#. `Install Homebrew <https://brew.sh/#install>`_.
4545
#. Execute ``brew install python docker``.
4646
#. Run the newly-installed Docker Desktop application.
@@ -54,7 +54,7 @@ Windows
5454
If running on Windows, either:
5555

5656
`Install Ubuntu on WSL2 <https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview>`_. Next, install then run
57-
`Docker Desktop`_; see the note above on the initialization process.
57+
`Docker Desktop <https://docs.docker.com/desktop/install/windows-install/>`_; see the note above on the initialization process.
5858

5959
**OR**
6060

@@ -140,7 +140,6 @@ This process may take a few minutes to complete. When it does:
140140
#. **Reboot your computer** to update your group membership.
141141
#. Run the Docker Desktop if using WSL2 on Windows or using OS X.
142142
#. Open a terminal.
143-
#. **OS X only**: Activate your virtual environment -- at the terminal, execute ``source rsdocker/rsvenv/bin/activate``.
144143

145144

146145
4. Build the necessary containers
@@ -273,7 +272,7 @@ After cloning a book, you may need to add it to the database. Most of the stand
273272

274273
PreTeXt authors, see `Publishing to Runestone Academy <https://pretextbook.org/doc/guide/html/sec-publishing-to-runestone-academy.html>`_. After that, you can build a pretext book just like building a Runestone book ``rsmanage build --ptx coursename``
275274

276-
The following information applies only *authoring* books using the Runestone.
275+
The following information applies only *authoring* books using the Runestone.
277276

278277
.. warning::
279278

@@ -357,7 +356,6 @@ Before using ``docker-tools`` or ``rsmanage``:
357356

358357
#. Run the Docker Desktop if using WSL2 on Windows or using OS X.
359358
#. Open a terminal.
360-
#. **OS X only**: Activate your virtual environment -- at the terminal, execute ``source rsdocker/rsvenv/bin/activate``.
361359
#. At the terminal, execute ``cd rsdocker/RunestoneServer``.
362360

363361

docker/docker_tools.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,19 +162,6 @@ def pip_user() -> str:
162162

163163
# Third-party bootstrap
164164
# ---------------------
165-
# On OS X, create then activate a venv. Otherwise, the ``docker-tools`` and ``rsmanage`` scripts don't get put in the default path (while on Linux they do) when not in a venv. Rather than require users to manually edit their path, use a venv and require them to activate the venv before running these scripts.
166-
if is_darwin and not IN_VENV:
167-
# If the repo's already cloned, but the venv isn't activated, create it if it doesn't exist.
168-
venv_path = (wd / (("../../" if IN_REPO else "") + "rsvenv")).resolve()
169-
if not venv_path.is_dir():
170-
xqt(f"python3 -m venv {venv_path}")
171-
# pip doesn't provide ``activate_this.py`` (Poetry does). For now, ask the user to run this in the created venv.
172-
sys.exit(
173-
"Phase 1 init complete. Execute:\n"
174-
f" source {venv_path}/bin/activate\n"
175-
"then re-run this command to continue to phase 2."
176-
)
177-
178165
# This comes after importing ``ci_utils``, since we use that to install click if necessary.
179166
try:
180167
import click
@@ -359,7 +346,7 @@ def init(
359346
# Provide server-related CLIs. While installing this sooner would be great, we can't assume that the prereqs (the downloaded repo) are available.
360347
check_install(f"{sys.executable} -m pip --version", "python3-pip")
361348
xqt(
362-
# Note: Outside a venv, OS X installs these into a place that's not in the default $PATH, making the scripts ``docker-tools`` and ``rsmanage`` not work unless the user manually adds the path. Add the ``--verbose`` flag to the install commands below to see where the scripts are place on OS X.
349+
# Note: Sometimes, OS X installs these into a place that's not in the default $PATH, making the scripts ``docker-tools`` and ``rsmanage`` not work unless the user manually adds the path. Add the ``--verbose`` flag to the install commands below to see where the scripts are placed on OS X.
363350
f"{sys.executable} -m pip install {pip_user()} -e docker",
364351
f"{sys.executable} -m pip install {pip_user()} -e rsmanage",
365352
)
@@ -369,6 +356,7 @@ def init(
369356
print(
370357
"\n" + "*" * 80 + "\n"
371358
"Downloaded the RunestoneServer repo. You must \n"
359+
'"cd RunestoneServer" before running this script again.'
372360
)
373361
if did_group_add:
374362
print(

0 commit comments

Comments
 (0)