Skip to content

Commit

Permalink
Added OhMyRunPod and RunPod File Uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleykleynhans committed Feb 21, 2024
1 parent 9b72da1 commit 08d1283
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ RUN curl https://getcroc.schollz.com | bash
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash && \
apt install speedtest

# Install Jupyter
# Install Jupyter, gdown and OhMyRunPod
RUN pip3 install -U --no-cache-dir jupyterlab \
jupyterlab_widgets \
ipykernel \
ipywidgets \
gdown
gdown \
OhMyRunPod

# Install RunPod File Uploader
RUN curl -sSL https://github.com/kodxana/RunPod-FilleUploader/raw/main/scripts/installer.sh -o installer.sh && \
chmod +x installer.sh && \
./installer.sh

# NGINX Proxy
COPY nginx/nginx.conf /etc/nginx/nginx.conf
Expand All @@ -129,12 +135,13 @@ COPY --chmod=755 scripts/start_textgen_server.sh /text-generation-webui/
COPY fetch_model.py /text-generation-webui/
COPY download_model.py /text-generation-webui/

WORKDIR /
# Set template version
ENV TEMPLATE_VERSION=1.12.4

# Copy the scripts
WORKDIR /
COPY --chmod=755 scripts/* ./

# Start the container
ENV TEMPLATE_VERSION=1.12.3
SHELL ["/bin/bash", "--login", "-c"]
CMD [ "/start.sh" ]
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
https://github.com/oobabooga/text-generation-webui)
* Torch 2.1.2
* xformers 0.0.23.post1
* Jupyter Lab
* [runpodctl](https://github.com/runpod/runpodctl)
* [OhMyRunPod](https://github.com/kodxana/OhMyRunPod)
* [RunPod File Uploader](https://github.com/kodxana/RunPod-FilleUploader)
* [croc](https://github.com/schollz/croc)
* [rclone](https://rclone.org/)
* speedtest-cli
Expand Down Expand Up @@ -47,12 +50,44 @@ docker run -d \
-p 3000:3001 \
-p 5000:5001 \
-p 8888:8888 \
-p 2999:2999 \
-e JUPYTER_PASSWORD=Jup1t3R! \
ashleykza/oobabooga:latest
```

You can obviously substitute the image name and tag with your own.

### Ports

| Connect Port | Internal Port | Description |
|--------------|---------------|------------------------|
| 3000 | 3001 | Text Generation Web UI |
| 5000 | 5001 | Open AI Compatible API |
| 8888 | 8888 | Jupyter Lab |
| 2999 | 2999 | RunPod File Uploader |

### Environment Variables

| Variable | Description | Default |
|--------------------|---------------------------------------------|-----------|
| JUPYTER_PASSWORD | Password for Jupyter Lab | Jup1t3R! |
| DISABLE_AUTOLAUNCH | Disable Web UI from launching automatically | (not set) |

## Logs

Text Generation Web UI creates a log file, and you can tail the log instead of
killing the service to view the logs.

| Application | Log file |
|-----------------------|-----------------------------|
| Text Generation Web UI | /workspace/logs/textgen.log |

For example:

```bash
tail -f /workspace/logs/textgen.log
```

## Community and Contributing

Pull requests and issues on [GitHub](https://github.com/ashleykleynhans/text-generation-docker)
Expand Down
16 changes: 10 additions & 6 deletions nginx/template-readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Text Generation Web UI: A Gradio web UI for Large Language Models. Supports transformers, GPTQ, llama.cpp (GGUF), Llama models

### Version 1.12.3
### Version 1.12.4

### Included in this Template

Expand All @@ -12,7 +12,10 @@
* Text Generation API
* Torch 2.1.2
* xformers 0.0.23.post1
* Jupyter Lab
* [runpodctl](https://github.com/runpod/runpodctl)
* [OhMyRunPod](https://github.com/kodxana/OhMyRunPod)
* [RunPod File Uploader](https://github.com/kodxana/RunPod-FilleUploader)
* [croc](https://github.com/schollz/croc)
* [rclone](https://rclone.org/)
* speedtest-cli
Expand All @@ -21,11 +24,12 @@

### Ports

| Port | Description |
|------|--------------------------------|
| 3000 | Text Generation Web UI |
| 5000 | Open AI Compatible API |
| 8888 | Jupyter Lab |
| Port | Description |
|------|-----------------------------|
| 3000 | Text Generation Web UI |
| 5000 | Open AI Compatible API |
| 8888 | Jupyter Lab |
| 2999 | RunPod File Uploader |

### Environment Variables

Expand Down
9 changes: 8 additions & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export_env_vars() {
start_jupyter() {
if [[ $JUPYTER_PASSWORD ]]; then
echo "Starting Jupyter Lab..."
mkdir -p /workspace/logs && \
mkdir -p /workspace/logs
cd / && \
nohup jupyter lab --allow-root \
--no-browser \
Expand All @@ -72,6 +72,12 @@ start_jupyter() {
fi
}

start_runpod_uploader() {
echo "Starting RunPod Uploader..."
nohup /usr/local/bin/runpod-uploader &> /workspace/logs/runpod-uploader.log &
echo "RunPod Uploader started"
}

configure_filezilla() {
# Only proceed if there is a public IP
if [[ ! -z "${RUNPOD_PUBLIC_IP}" ]]; then
Expand Down Expand Up @@ -140,6 +146,7 @@ echo "Container Started, configuration in progress..."
start_nginx
setup_ssh
start_jupyter
start_runpod_uploader
execute_script "/pre_start.sh" "Running pre-start script..."
configure_filezilla
export_env_vars
Expand Down

0 comments on commit 08d1283

Please sign in to comment.