z.ai / Dockerfile
Gemini CLI
Configure for Hugging Face Spaces
7864524
raw
history blame contribute delete
643 Bytes
FROM python:3.12-slim
# Set environment variables
ENV LISTEN_PORT=7860
ENV DB_PATH=/app/data/tokens.db
ENV PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Create data and logs directories and set permissions
# HF Spaces runs as user 1000, so we make sure it can write to these directories
RUN mkdir -p /app/data /app/logs && \
chmod -R 777 /app/data /app/logs
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Ensure all files are accessible
RUN chmod -R 777 /app
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "main.py"]