Using Conda for the base environment and uv for the heavy lifting is a great strategy on Apple Silicon. It allows Conda to handle the trickier low-level library dependencies (like specialized math or compression libraries) while uv handles the Python packages at lightning speed.

Here is the setup tailored for your M1 Max.

Phase 1: Installation with Conda and uv

Since you already use VS Code and Python notebooks, this will integrate perfectly with your existing workflow.

  1. Create the Conda Environment:
    Open your terminal and create a clean environment.
conda create -n marker python=3.12 -y
conda activate marker
  1. Install uv (if you don't have it):
    If uv isn't already in your path, the fastest way to get it is:
curl -LsSf https://astral.sh/uv/install.sh | sh
# Then restart your terminal or source your profile
  1. Install Marker using uv:
    Using uv pip inside your active Conda environment ensures everything stays contained but installs in seconds.
uv pip install marker-pdf
  1. Verifying the Setup:
    Once installed, you can run this quick check to make sure it's actually talking to your M1 Max GPU:
python -c "import torch; print(f'MPS Available: {torch.backends.mps.is_available()}')"

If that returns True, Marker will fly through your papers.

  1. Run the Test:
marker_single /path/to/your_paper.pdf --output_dir ~/Desktop/marker_output

Phase 2: Complete Uninstallation & Drive Cleanup

Because Marker downloads several large models (Surya for layout, Texify for LaTeX, etc.), simply deleting the Conda environment will not reclaim your disk space. You must manually clear the model cache.

  1. Remove the Conda Environment:
conda deactivate
conda remove -n marker --all -y
  1. Wipe the Model Weights (The "Big" Cleanup):
    This is where the 2–5 GB of model data lives.
rm -rf ~/.cache/datalab

Note: If you've used other datalab-to tools, this will remove their models as well.

  1. Optional: Clean uv Cache:
    If you want to be extra thorough about reclaiming space from the pip packages themselves:
uv cache clean

The following shell alias allows you to run Marker conversions from any directory without manually activating the Conda environment or remembering the full output path every time.

1. Create the Shell Alias

Add this to your ~/.zshrc file (the default for macOS):

# Marker PDF conversion alias
alias marker-convert='function _marker_convert() { \
    conda activate marker_env; \
    # Default output to a "converted" folder in the current directory if not specified
    OUT_DIR="${2:-./converted_markdown}"; \
    mkdir -p "$OUT_DIR"; \
    marker_single "$1" --output_dir "$OUT_DIR"; \
    conda deactivate; \
}; _marker_convert'

2. Apply the Changes

After saving the file, refresh your terminal:

source ~/.zshrc

3. Usage

Now you can convert any academic paper by simply typing:

marker-convert path/to/research_paper.pdf