mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-03-16 07:02:22 +00:00
fix: add platform config in docker compose (#60)
This commit is contained in:
parent
2a556c275c
commit
74d7038a79
3 changed files with 6 additions and 22 deletions
|
@ -5,7 +5,6 @@ FROM ubuntu:jammy-20230522 AS base
|
|||
ARG ARG_UID
|
||||
ARG ARG_GID
|
||||
ARG ARG_CLOUD_BUILD=0 # Default to local docker build
|
||||
ARG ARCH=amd64 # Default to amd64 if not provided
|
||||
|
||||
# Install system dependencies
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
|
@ -21,9 +20,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
|||
curl -LO https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn_1.22.19_all.deb \
|
||||
&& dpkg -i yarn_1.22.19_all.deb \
|
||||
&& rm yarn_1.22.19_all.deb && \
|
||||
curl -LO https://github.com/jgm/pandoc/releases/download/3.1.3/pandoc-3.1.3-1-${ARCH}.deb \
|
||||
&& dpkg -i pandoc-3.1.3-1-${ARCH}.deb \
|
||||
&& rm pandoc-3.1.3-1-${ARCH}.deb && \
|
||||
curl -LO https://github.com/jgm/pandoc/releases/download/3.1.3/pandoc-3.1.3-1-amd64.deb \
|
||||
&& dpkg -i pandoc-3.1.3-1-amd64.deb \
|
||||
&& rm pandoc-3.1.3-1-amd64.deb && \
|
||||
rm -rf /var/lib/apt/lists/* /usr/share/icons && \
|
||||
dpkg-reconfigure -f noninteractive tzdata && \
|
||||
python3 -m pip install --no-cache-dir virtualenv
|
||||
|
|
|
@ -9,22 +9,7 @@ Use the Dockerized version of AnythingLLM for a much faster and complete startup
|
|||
- `git clone` this repo and `cd anything-llm` to get to the root directory.
|
||||
- `yarn setup:envs` from repo root & fill out the `.env` file that is then created in `./docker/`
|
||||
- `cd docker/`
|
||||
- To build the image, **use any of these commands based on your CPU architecture**.
|
||||
|
||||
**This will use `amd64` (common on Windows/Intel Mac)**
|
||||
|
||||
```
|
||||
docker-compose up -d --build
|
||||
```
|
||||
|
||||
**This will use `arm64` (M1/M2 Mac)**
|
||||
|
||||
```
|
||||
ARCH=arm64 docker-compose up -d --build
|
||||
```
|
||||
|
||||
This step will take a few moments on the first run.
|
||||
|
||||
- `docker-compose up -d --build` to build the image - this will take a few moments.
|
||||
|
||||
Your docker host will show the image as online once the build process is completed. This will build the app to `http://localhost:3001`.
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ services:
|
|||
anything-llm:
|
||||
container_name: anything-llm
|
||||
image: anything-llm:latest
|
||||
platform: linux/amd64
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./docker/Dockerfile
|
||||
|
@ -17,7 +18,6 @@ services:
|
|||
ARG_UID: ${UID}
|
||||
ARG_GID: ${GID}
|
||||
ARG_CLOUD_BUILD: ${CLOUD_BUILD}
|
||||
ARCH: ${ARCH:-amd64}
|
||||
volumes:
|
||||
- "../server/storage:/app/server/storage"
|
||||
- "../collector/hotdir/:/app/collector/hotdir"
|
||||
|
|
Loading…
Add table
Reference in a new issue