deployment

This commit is contained in:
steven@rockyserver 2026-11-01 14:22:24 +00:00
commit 49e53ddf33
7 changed files with 341 additions and 7 deletions

View file

@ -0,0 +1 @@
work/

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 nezhar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,58 @@
# Jupyter Docker Compose
A quick and easy setup for running Jupyter notebooks in a Dockerized environment, managed using [Docker Compose](https://docs.docker.com/compose/). This setup makes it simple to get up and running with Jupyter, share notebooks across multiple team members, and maintain consistent environments. It is also compatible with GitHub Code Spaces for remote development.
## Features
- GitHub Template repository for easy reuse.
- Dockerized Jupyter environment for consistent, reproducible notebook runs.
- Simplified sharing of notebooks using the `work` directory.
- Compatibility with GitHub Code Spaces for seamless remote development.
## Getting Started
Clone this repository to your local machine:
```bash
git clone https://github.com/nezhar/jupyter-docker-compose.git
```
Navigate to the project root directory:
```bash
cd jupyter-docker-compose
```
Build the the image for the Jupyter Notebook server:
```bash
docker compose build
```
Start the Jupyter Notebook server:
```bash
docker compose up
```
After running this command, the Jupyter Notebook server should be accessible at `http://localhost:8888`.
## Using GitHub Code Spaces
This setup can also be used with GitHub Code Spaces. All the necessary configuration is provided in the `devcontainer.json` file. Just open this repository in a new code space, and the environment will be ready to go.
## Directory Structure
- `./work`: This is the directory where you can add your Jupyter notebooks. It's mounted as a volume in the Docker container, so notebooks created and saved in the Jupyter Notebook IDE will persist here.
## Notes
The `requirements.txt` file is copied to the Docker container during the build process, and the Python dependencies listed within are installed. To add or update dependencies, modify this file, then rebuild the Docker image.
## Contributions
Contributions to this project are welcome! Please create an issue or submit a pull request.
## License
This project is licensed under the MIT License - see the LICENSE file for details.

View file

@ -0,0 +1,24 @@
networks:
proxy_net:
name: "proxy-net"
external: true
services:
jupyter:
build:
context: .
dockerfile: ./docker/jupyter/Dockerfile
volumes:
- ./work:/home/jovyan/work
- ./ssh/config:/home/jovyan/.ssh/config
- /home/steven/.ssh/id_ed25519.pub:/home/jovyan/.ssh/id_ed25519.pub
- /home/steven/.ssh/id_ed25519:/home/jovyan/.ssh/id_ed25519
# port: 8888
networks:
- proxy_net
command: "start-notebook.sh --NotebookApp.token="
labels:
- traefik.enable=true
- traefik.http.routers.jupyterlab-stvnliu-me.tls=true
- traefik.http.routers.jupyterlab-stvnliu-me.entrypoints=websecure
- traefik.http.routers.jupyterlab-stvnliu-me.rule=Host(`lab.stvnliu.me`)
- traefik.http.services.jupyterlab-stvnliu-me.loadbalancer.server.port=8888

View file

@ -0,0 +1,4 @@
FROM quay.io/jupyter/minimal-notebook:latest
COPY ./requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt

View file

@ -0,0 +1,4 @@
numpy==2.4.1
pandas==2.3.3
matplotlib==3.10.8
scikit-learn==1.8.0

View file

@ -0,0 +1,2 @@
Match User git Host stvnliu.me
Port 2222