diff --git a/Dockerfile b/Dockerfile index 61348e690b9..a5af06e220b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,12 @@ # We can't use slim because we need either git/wget/curl to # download mesa-examples, and so installing them requires # updating the system anyway. -# We can't use alpine because NumPy doesn't support musllinux yet. -# But it's in the RC version https://github.com/numpy/numpy/issues/20089. FROM python:bookworm -LABEL maintainer="rht " +LABEL maintainer="projectmesa maintainers@projectmesa.dev" # To use this Dockerfile: -# 1. `docker build . -t mymesa_image` -# 2. `docker run --name mymesa_instance -p 8765:8765 -it mymesa_image` +# 1. `docker build . -t mesa_image` +# 2. `docker run --name mesa_instance -p 8765:8765 -it mesa_image` # 3. In your browser, visit http://127.0.0.1:8765 # # Currently, this Dockerfile defaults to running the Schelling model, as an @@ -19,7 +17,7 @@ LABEL maintainer="rht " # `docker run --name mymesa_instance -p 8765:8765 -e MODEL_DIR=/mesa-examples/examples/sugarscape_cg -it mymesa_image` # Note: the model directory MUST contain an app.py file. -ENV MODEL_DIR=/mesa-examples/examples/schelling_experimental +ENV MODEL_DIR=/opt/mesa/mesa/examples/basic/schelling # Don't buffer output: # https://docs.python.org/3.10/using/cmdline.html?highlight=pythonunbuffered#envvar-PYTHONUNBUFFERED @@ -29,10 +27,11 @@ WORKDIR /opt/mesa COPY . /opt/mesa -RUN cd / && git clone https://github.com/projectmesa/mesa-examples.git - EXPOSE 8765/tcp -RUN pip3 install -e /opt/mesa +RUN pip3 install -e /opt/mesa[rec] CMD ["sh", "-c", "cd $MODEL_DIR && solara run app.py --host=0.0.0.0"] + +# To check file system: +# docker exec -it mesa_instance bash diff --git a/docker-compose.yml b/docker-compose.yml index 9b8e165f0f1..7831079b6ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,6 @@ services: # within the current directory. # E.g. if it is at my-model, then you specify it as # /opt/mesa/my-model. - MODEL_DIR: /mesa-examples/examples/schelling_experimental + MODEL_DIR: /opt/mesa/mesa/examples/basic/schelling ports: - 8765:8765