Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Enhancements made

- Mkdir and chown unconditionally and let it throw errors if it fails [#56](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/56) ([@GeorgianaElena](https://github.com/GeorgianaElena))
- Setup a custom ownership uid:gid of the initial share [#55](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/55) ([@GeorgianaElena](https://github.com/GeorgianaElena), [@yuvipanda](https://github.com/yuvipanda))
- Setup a custom ownership uid:gid of the initial share [#55](https://github.com/2i2c-org/jupyterhub-home-nfs/pull/55) ([@GeorgianaElena](https://github.com/GeorgianaElena), [@yuvipanda](https://github.com/yuvipanda))

### Contributors to this release

Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:24.04 AS base

RUN apt-get update > /dev/null && \
apt-get install --yes python3 python3-pip python3-venv xfsprogs > /dev/null && \
apt-get install --yes python3 python3-pip python3-venv xfsprogs tini > /dev/null && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Create and activate virtual environment
Expand All @@ -13,6 +13,7 @@ COPY ./pyproject.toml /opt/jupyterhub-home-nfs/pyproject.toml
COPY ./README.md /opt/jupyterhub-home-nfs/README.md

WORKDIR /opt/jupyterhub-home-nfs
ENTRYPOINT ["tini", "--"]

# Development stage
FROM base AS dev
Expand All @@ -29,7 +30,7 @@ COPY ./jupyterhub_home_nfs /opt/jupyterhub-home-nfs/jupyterhub_home_nfs

RUN pip install -e .

CMD ["/usr/local/bin/start.sh"]
CMD ["/bin/bash", "/usr/local/bin/start.sh"]

# Production stage
FROM base AS prod
Expand Down
8 changes: 6 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
privileged: true # Needed for mounting XFS
volumes:
- ./jupyterhub_home_nfs:/app
command: /usr/local/bin/start.sh

test:
profiles: ["test"] # This service will only run when explicitly requested
Expand All @@ -19,6 +18,11 @@ services:
volumes:
- ./jupyterhub_home_nfs:/app
- ./tests:/app/tests
command: sh -c "/usr/local/bin/mount-xfs.sh && python3 -m pytest -v /app/tests/tests.py"
command:
[
"/bin/bash",
"-c",
"/usr/local/bin/mount-xfs.sh && python3 -m pytest -v /app/tests/tests.py",
]
environment:
- PYTHONPATH=/app
4 changes: 2 additions & 2 deletions helm/jupyterhub-home-nfs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
{{- if .Values.quotaEnforcer.enabled }}
- name: enforce-xfs-quota
image: "{{ .Values.quotaEnforcer.image.repository }}:{{ .Values.quotaEnforcer.image.tag }}"
command: ["python", "-m", "jupyterhub_home_nfs.generate", "--config-file", "/etc/jupyterhub-home-nfs/mounted-secret/quota-enforcer-config.py"]
args: ["python", "-m", "jupyterhub_home_nfs.generate", "--config-file", "/etc/jupyterhub-home-nfs/mounted-secret/quota-enforcer-config.py"]
securityContext:
privileged: true
volumeMounts:
Expand All @@ -73,7 +73,7 @@ spec:
- name: auto-xfs-resizer
# Use same image as quotaEnforcer as it has xfs_growfs
image: "{{ .Values.quotaEnforcer.image.repository }}:{{ .Values.quotaEnforcer.image.tag }}"
command:
args:
- /bin/bash
- -c
- |
Expand Down