openwebui-demo / Dockerfile
Temp User
Initial setup for Open WebUI on Hugging Face Space
22c6426
raw
history blame contribute delete
830 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
build-essential \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Clone Open WebUI
RUN git clone https://github.com/open-webui/open-webui.git .
# Install requirements
WORKDIR /app/backend
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir python-dotenv
# Set up frontend
WORKDIR /app
RUN npm install
RUN npm run build
# Set environment variables
ENV ENV=prod
ENV PORT=7860
ENV HOST=0.0.0.0
# HF token will be set via Hugging Face Spaces secrets
ENV WEBUI_AUTH=false
# Create start script
WORKDIR /app/backend
COPY start.sh /app/backend/
RUN chmod +x /app/backend/start.sh
# Expose port
EXPOSE 7860
# Start the application
CMD ["/app/backend/start.sh"]