Skip to content

Commit

Permalink
make the docker setup consistent with local
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekelly committed Apr 17, 2023
1 parent 316f37b commit e938c59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ ENV PIP_NO_CACHE_DIR=yes \

# Create a non-root user and set permissions
RUN useradd --create-home appuser
WORKDIR /home/appuser
RUN chown appuser:appuser /home/appuser
WORKDIR /home/appuser/app
RUN chown appuser:appuser /home/appuser/app

USER appuser

# Copy the requirements.txt file and install the requirements
COPY --chown=appuser:appuser requirements-docker.txt .
RUN pip install --no-cache-dir --user -r requirements-docker.txt
RUN pip install --user -r requirements-docker.txt

# Copy the application files
COPY --chown=appuser:appuser autogpt/ ./autogpt
COPY --chown=appuser:appuser . .

# Set the entrypoint
ENTRYPOINT ["python", "-m", "autogpt"]
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ services:
env_file:
- .env
volumes:
- "./autogpt:/app"
- ".env:/app/.env"
profiles: ["exclude-from-up"]
- "./:/home/appuser/app"
profiles: ["exclude-from-up"] # Run and attach to container instead with: `docker-compose run auto-gpt`

redis:
image: "redis/redis-stack-server:latest"

0 comments on commit e938c59

Please sign in to comment.