-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (36 loc) · 1.67 KB
/
Dockerfile
File metadata and controls
50 lines (36 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Use the official Python image from the Docker Hub.
# This runs on Debian Linux.
FROM python:3.13-slim-trixie AS base
LABEL maintainer="Lawrence McDaniel <lpm0073@gmail.com>" \
description="Docker image for the StackademyAssistent" \
license="GNU AGPL v3" \
vcs-url="https://github.com/FullStackWithLawrence/agentic-ai-workflow" \
org.opencontainers.image.title="StackademyAssistent" \
org.opencontainers.image.version="0.1.6" \
org.opencontainers.image.authors="Lawrence McDaniel <lpm0073@gmail.com>" \
org.opencontainers.image.url="https://FullStackWithLawrence.github.io/agentic-ai-workflow/" \
org.opencontainers.image.source="https://github.com/FullStackWithLawrence/agentic-ai-workflow" \
org.opencontainers.image.documentation="https://FullStackWithLawrence.github.io/agentic-ai-workflow/"
# Environment: local, alpha, beta, next, or production
ARG ENVIRONMENT=local
ENV ENVIRONMENT=$ENVIRONMENT
RUN echo "ENVIRONMENT: $ENVIRONMENT"
FROM base AS requirements
# Set the working directory to /app
WORKDIR /dist
# Copy the current directory contents into the container at /app
COPY requirements/base.txt base.txt
COPY requirements/local.txt local.txt
# Set environment variables
ENV PYTHONPATH=/dist
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r base.txt
# Install Python dependencies for the local environment for cases where
# we're going to run python unit tests in the Docker container.
RUN if [ "$ENVIRONMENT" = "local" ] ; then pip install -r local.txt ; fi
FROM requirements AS app
WORKDIR /dist
COPY app /dist/app
FROM app AS runtime
# Run the application when the container launches
CMD ["python", "-m", "app.agent"]