File tree Expand file tree Collapse file tree 4 files changed +52
-1
lines changed Expand file tree Collapse file tree 4 files changed +52
-1
lines changed Original file line number Diff line number Diff line change 6
6
jobs :
7
7
release :
8
8
runs-on : " ubuntu-latest"
9
- timeout-minutes : 5
9
+ timeout-minutes : 10
10
10
steps :
11
11
- name : Check out the repo
12
12
uses : actions/checkout@v5
13
+ - name : Set up Docker Buildx
14
+ uses : docker/setup-buildx-action@v3
13
15
- name : Log in to Docker Hub
14
16
uses : docker/login-action@v3
15
17
with :
32
34
uses : docker/build-push-action@v6
33
35
with :
34
36
context : .
37
+ platforms : linux/amd64,linux/arm64
35
38
push : true
36
39
build-args : |
37
40
GIT_REVISION=${{ github.sha }}
Original file line number Diff line number Diff line change @@ -37,4 +37,7 @@ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
37
37
# Copy application code after dependencies are installed
38
38
COPY . .
39
39
40
+ # Set PYTHONPATH to include the working directory for module imports
41
+ ENV PYTHONPATH="${PYTHONPATH}:/app"
42
+
40
43
CMD ["python" , "template_langgraph/core.py" ]
Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ docker-build: ## build Docker image
76
76
docker-run : # # run Docker container
77
77
docker run --rm $(DOCKER_REPO_NAME ) /$(DOCKER_IMAGE_NAME ) :$(GIT_TAG ) $(DOCKER_COMMAND )
78
78
79
+ .PHONY : docker-run-streamlit
80
+ docker-run-streamlit : # # run Docker container with Streamlit app
81
+ docker run --rm \
82
+ -p 8501:8501 \
83
+ -v $(PWD ) /.env:/app/.env \
84
+ $(DOCKER_REPO_NAME ) /$(DOCKER_IMAGE_NAME ) :$(GIT_TAG ) \
85
+ streamlit run template_langgraph/services/streamlits/main.py --server.address 0.0.0.0
86
+
79
87
.PHONY : docker-lint
80
88
docker-lint : # # lint Dockerfile
81
89
docker run --rm -i hadolint/hadolint < Dockerfile
Original file line number Diff line number Diff line change @@ -240,6 +240,43 @@ Demonstration of the Streamlit app:
240
240
241
241
[ ![ streamlit.png] ( ./images/streamlit.png )] ( https://youtu.be/undxBwyJ3Sc )
242
242
243
+ ### Option 6: Docker (Production deployment)
244
+
245
+ You can run the application in Docker for consistent deployment across environments:
246
+
247
+ #### Building the Docker Image
248
+
249
+ ``` shell
250
+ # Build the Docker image locally
251
+ make docker-build
252
+
253
+ # Or build with specific tag
254
+ docker build -t ks6088ts/template-langgraph:latest .
255
+ ```
256
+
257
+ #### Running Streamlit in Docker
258
+
259
+ ``` shell
260
+ # Run Streamlit app with Docker
261
+ make docker-run-streamlit
262
+
263
+ # Or run manually with environment file
264
+ docker run --rm \
265
+ -p 8501:8501 \
266
+ -v ./.env:/app/.env \
267
+ ks6088ts/template-langgraph:latest \
268
+ streamlit run template_langgraph/services/streamlits/main.py --server.address 0.0.0.0
269
+ ```
270
+
271
+ #### Multi-Architecture Support
272
+
273
+ The Docker images are built for both ` amd64 ` and ` arm64 ` architectures, making them compatible with:
274
+ - Intel/AMD x64 processors
275
+ - Apple Silicon (M1/M2/M3/M4) processors
276
+ - ARM-based servers
277
+
278
+ Access the Streamlit app at [ http://localhost:8501 ] ( http://localhost:8501 ) after running the container.
279
+
243
280
### More agent runs
244
281
245
282
- Issue formatter (structured output):
You can’t perform that action at this time.
0 commit comments