File size: 989 Bytes
91dd156
 
 
84e313b
 
 
 
 
 
 
91dd156
 
84e313b
 
91dd156
84e313b
91dd156
 
 
 
 
 
 
 
84e313b
91dd156
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM stephengpope/no-code-architects-toolkit:latest

# Set up user for Hugging Face Spaces compatibility
RUN useradd -m -u 1000 user # Uncommented to create the user
USER user # Switch to the created user

ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

# Create data directory for persistence if using Hugging Face Spaces persistent storage
# This directory is owned by root initially, ensure user has write access if needed at runtime
# Or adjust permissions if build-time access is required (though /data is runtime only)
RUN mkdir -p /data
# If runtime write issues occur, consider adding: RUN chown user:user /data

# Default environment variables
ENV API_KEY=your_api_key \
    LOCAL_STORAGE_PATH=/data \
    MAX_QUEUE_LENGTH=10 \
    GUNICORN_WORKERS=4 \
    GUNICORN_TIMEOUT=300

# Expose the port that the API will run on (ensure this matches README.md app_port)
EXPOSE 8080

# The container will start automatically with the CMD from the base image