Skip to content

Commit 5939317

Browse files
AdamZh0uwang-boyu
authored andcommittedDec 2, 2024
modif docker configs for example test
1 parent 778f6a6 commit 5939317

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed
 

‎Dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ FROM python:bookworm
77
LABEL maintainer="rht <rhtbot@protonmail.com>"
88

99
# To use this Dockerfile:
10-
# 1. `docker build . -t mymesa_image`
11-
# 2. `docker run --name mymesa_instance -p 8765:8765 -it mymesa_image`
10+
# 1. `docker build . -t mesa_image`
11+
# 2. `docker run --name mesa_instance -p 8765:8765 -it mesa_image`
1212
# 3. In your browser, visit http://127.0.0.1:8765
1313
#
1414
# Currently, this Dockerfile defaults to running the Schelling model, as an
@@ -19,7 +19,7 @@ LABEL maintainer="rht <rhtbot@protonmail.com>"
1919
# `docker run --name mymesa_instance -p 8765:8765 -e MODEL_DIR=/mesa-examples/examples/sugarscape_cg -it mymesa_image`
2020
# Note: the model directory MUST contain an app.py file.
2121

22-
ENV MODEL_DIR=/mesa-examples/examples/schelling_experimental
22+
ENV MODEL_DIR=/opt/mesa/mesa/examples/basic/schelling
2323

2424
# Don't buffer output:
2525
# https://docs.python.org/3.10/using/cmdline.html?highlight=pythonunbuffered#envvar-PYTHONUNBUFFERED
@@ -29,10 +29,11 @@ WORKDIR /opt/mesa
2929

3030
COPY . /opt/mesa
3131

32-
RUN cd / && git clone https://github.com/projectmesa/mesa-examples.git
33-
3432
EXPOSE 8765/tcp
3533

36-
RUN pip3 install -e /opt/mesa
34+
RUN pip3 install -e /opt/mesa[all]
3735

3836
CMD ["sh", "-c", "cd $MODEL_DIR && solara run app.py --host=0.0.0.0"]
37+
38+
# To check file system:
39+
# docker exec -it mesa_instance bash

‎docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ services:
1616
# within the current directory.
1717
# E.g. if it is at my-model, then you specify it as
1818
# /opt/mesa/my-model.
19-
MODEL_DIR: /mesa-examples/examples/schelling_experimental
19+
MODEL_DIR: /opt/mesa/mesa/examples/basic/schelling
2020
ports:
2121
- 8765:8765

0 commit comments

Comments
 (0)
Please sign in to comment.