mirror of
https://github.com/tcsenpai/easy-web-summarizer.git
synced 2025-06-06 10:35:20 +00:00
Update Dockerfile and README.md for Docker support
This commit is contained in:
parent
5178952ab6
commit
aea37cf409
25
Dockerfile
Normal file
25
Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
# Use an official Python runtime as the base image
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the requirements file into the container
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install the required dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application code into the container
|
||||
COPY . .
|
||||
|
||||
# Expose the port that the application will listen on
|
||||
EXPOSE 7860
|
||||
|
||||
# Set the environment variable
|
||||
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
||||
|
||||
# Define the command to run the application
|
||||
CMD ["python", "webui.py"]
|
||||
|
||||
|
14
README.md
14
README.md
@ -40,6 +40,20 @@ python webui.py
|
||||
|
||||

|
||||
|
||||
## Docker
|
||||
|
||||
```bash
|
||||
docker build -t web_summarizer .
|
||||
docker run -p 7860:7860 web_summarizer
|
||||
|
||||
# Run if you run ollama on host
|
||||
docker run --network='host' -p 7860:7860 web_summarizer
|
||||
|
||||
# Run both app and ollama as docker containers
|
||||
docker compose up
|
||||
```
|
||||
|
||||
|
||||
## Development
|
||||
|
||||
To contribute to the development of this script, clone the repository, make your changes, and submit a pull request. We welcome contributions that improve the script's functionality or extend its capabilities.
|
||||
|
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
services:
|
||||
ollama-container:
|
||||
image: ollama/ollama
|
||||
volumes:
|
||||
- ./data/ollama:/root/.ollama
|
||||
ports:
|
||||
- "11434:11434"
|
||||
gradio-app:
|
||||
image: easy-web-summarizer
|
||||
ports:
|
||||
- "7860:7860"
|
Loading…
x
Reference in New Issue
Block a user