Skip to content
Snippets Groups Projects
Commit 36effb0c authored by TYLER CARAZA-HARTER's avatar TYLER CARAZA-HARTER
Browse files

allow different prefixes to allow testing of different students in parallel

parent 000694a4
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,4 @@ FROM ubuntu:24.04
RUN apt-get update && apt-get install -y python3 python3-pip curl iproute2
COPY requirements.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt --break-system-packages
CMD ["python3", "-m", "jupyterlab", "--no-browser", "--ip=0.0.0.0", "--port=????", "--allow-root", "--NotebookApp.token=''"]
CMD ["python3", "-m", "jupyterlab", "--no-browser", "--ip=0.0.0.0", "--port=600", "--allow-root", "--NotebookApp.token=''"]
......@@ -39,20 +39,20 @@ it). Note that there are two services, "cache" with 3 replicas and
You should have Dockerfiles named "Dockerfile.cache" and "Dockerfile.dataset" that we can build like this to produce the Docker images for these two services:
```
docker build . -f Dockerfile.cache -t cache
docker build . -f Dockerfile.dataset -t dataset
docker build . -f Dockerfile.cache -t p2-cache
docker build . -f Dockerfile.dataset -t p2-dataset
```
Note that the compose file assumes there is a "PROJECT" environment
variable. The tester will make use of this. You can set it however you like with this command in your environment:
variable. You can set it to p2 in your environment:
```
export PROJECT=????
export PROJECT=p2
```
Whatever you set will be a prefix for the container names. For
Whatever this is set to will be a prefix for the container names. For
example, if it is "abc", your first cache container will be named
"abc-cache-1".
"abc-cache-1". The autograder will may use a prefix other than p2.
Web requests to the caching layer specify a zipcode, and the number of
addresses that should be returned (the "limit"). To find the answer,
......
......@@ -2,15 +2,15 @@ name: ${PROJECT}
services:
cache:
image: cache
image: ${PROJECT}-cache
deploy:
replicas: 3
ports:
- "8000-8002:8080"
- "8080"
environment:
- PROJECT=${PROJECT}
dataset:
image: dataset
image: ${PROJECT}-dataset
deploy:
replicas: 2
environment:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment