findEthics commited on
Commit
261c874
Β·
1 Parent(s): f0b765c

Add docker file bacl

Browse files
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 slim image for efficiency
2
+ FROM python:3.9-slim
3
+
4
+ # Create a non-root user for security
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+
8
+ # Set environment variables
9
+ ENV PATH="/home/user/.local/bin:$PATH"
10
+ ENV PYTHONPATH="/app:$PYTHONPATH"
11
+
12
+ # Set working directory
13
+ WORKDIR /app
14
+
15
+ # Copy requirements file with proper ownership
16
+ COPY --chown=user requirements.txt requirements.txt
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir --upgrade pip && \
20
+ pip install --no-cache-dir --upgrade -r requirements.txt
21
+
22
+ # Copy application code
23
+ COPY --chown=user app.py /app/
24
+ COPY --chown=user . /app/
25
+
26
+ # Expose port 7860 for Hugging Face Spaces
27
+ EXPOSE 7860
28
+
29
+ # Command to run the application
30
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
FINAL_STRUCTURE_VALIDATION.json CHANGED
The diff for this file is too large to render. See raw diff
 
docs/reference/FINAL_STRUCTURE_VALIDATION.json CHANGED
The diff for this file is too large to render. See raw diff
 
docs/reference/final_project_structure.md CHANGED
@@ -11,6 +11,7 @@ atlas-ai-chat/
11
  β”œβ”€β”€ app.py # Main Flask application (HF Spaces entry point)
12
  β”œβ”€β”€ requirements.txt # Python dependencies (HF Spaces requirement)
13
  β”œβ”€β”€ README.md # Project documentation
 
14
  β”œβ”€β”€ analytics/ # Core analytics module
15
  β”‚ β”œβ”€β”€ __init__.py
16
  β”‚ β”œβ”€β”€ collectors.py # Data collection utilities
 
11
  β”œβ”€β”€ app.py # Main Flask application (HF Spaces entry point)
12
  β”œβ”€β”€ requirements.txt # Python dependencies (HF Spaces requirement)
13
  β”œβ”€β”€ README.md # Project documentation
14
+ β”œβ”€β”€ Dockerfile # Container configuration (HF Spaces requirement)
15
  β”œβ”€β”€ analytics/ # Core analytics module
16
  β”‚ β”œβ”€β”€ __init__.py
17
  β”‚ β”œβ”€β”€ collectors.py # Data collection utilities