Spaces:
Running on Zero
Running on Zero
atakan commited on
Commit ·
8e40b3a
1
Parent(s): 6d7f290
feat: Add Dockerfile and Hugging Face Space configuration
Browse files- Dockerfile +44 -0
- README.md +10 -0
- requirements.txt +2 -0
Dockerfile
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# Prevent interactive prompts & buffer logs
|
| 4 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 5 |
+
PYTHONUNBUFFERED=1 \
|
| 6 |
+
DEBIAN_FRONTEND=noninteractive \
|
| 7 |
+
PORT=7860 \
|
| 8 |
+
HOME=/home/user
|
| 9 |
+
|
| 10 |
+
# Install essential scientific computation libraries and compilers
|
| 11 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
+
build-essential \
|
| 13 |
+
cmake \
|
| 14 |
+
git \
|
| 15 |
+
curl \
|
| 16 |
+
liblapack-dev \
|
| 17 |
+
libblas-dev \
|
| 18 |
+
gfortran \
|
| 19 |
+
libopenblas-dev \
|
| 20 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
+
|
| 22 |
+
# Set up user for Hugging Face Spaces security standard
|
| 23 |
+
RUN useradd -m -u 1000 user
|
| 24 |
+
WORKDIR /home/user/app
|
| 25 |
+
|
| 26 |
+
# Install Python dependencies
|
| 27 |
+
COPY requirements.txt .
|
| 28 |
+
RUN pip install --no-cache-dir --upgrade pip && \
|
| 29 |
+
pip install --no-cache-dir -r requirements.txt
|
| 30 |
+
|
| 31 |
+
# Copy application files
|
| 32 |
+
COPY --chown=user:user . .
|
| 33 |
+
|
| 34 |
+
# Ensure storage directories exist with write access
|
| 35 |
+
RUN mkdir -p outputs/plots data/rag_index data/user_docs && \
|
| 36 |
+
chown -R user:user /home/user
|
| 37 |
+
|
| 38 |
+
USER user
|
| 39 |
+
|
| 40 |
+
# Expose standard Hugging Face Spaces port
|
| 41 |
+
EXPOSE 7860
|
| 42 |
+
|
| 43 |
+
# Launch FastAPI web console
|
| 44 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# ControlAI: Open-Source Safety-Critical AI Agent for Control Systems Engineering
|
| 2 |
|
|
|
|
| 3 |
[](https://github.com/atakankahya/controlai-agent)
|
| 4 |
[](https://huggingface.co/atakankahya/ControlAI-Agent)
|
| 5 |
[](https://opensource.org/licenses/MIT)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: ControlAI Agent
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: indigo
|
| 5 |
+
sdk: docker
|
| 6 |
+
app_port: 7860
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
# ControlAI: Open-Source Safety-Critical AI Agent for Control Systems Engineering
|
| 11 |
|
| 12 |
+
[](https://huggingface.co/spaces/atakankahya/ControlAI-Agent)
|
| 13 |
[](https://github.com/atakankahya/controlai-agent)
|
| 14 |
[](https://huggingface.co/atakankahya/ControlAI-Agent)
|
| 15 |
[](https://opensource.org/licenses/MIT)
|
requirements.txt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
torch>=2.0.0
|
| 2 |
transformers>=4.40.0
|
| 3 |
accelerate>=0.28.0
|
|
|
|
| 4 |
scipy>=1.11.0
|
| 5 |
numpy>=1.24.0
|
| 6 |
matplotlib>=3.7.0
|
|
@@ -8,6 +9,7 @@ control>=0.9.4
|
|
| 8 |
cvxpy>=1.4.0
|
| 9 |
rich>=13.7.0
|
| 10 |
rank-bm25>=0.2.2
|
|
|
|
| 11 |
fastapi>=0.110.0
|
| 12 |
uvicorn>=0.28.0
|
| 13 |
python-multipart>=0.0.9
|
|
|
|
| 1 |
torch>=2.0.0
|
| 2 |
transformers>=4.40.0
|
| 3 |
accelerate>=0.28.0
|
| 4 |
+
peft>=0.10.0
|
| 5 |
scipy>=1.11.0
|
| 6 |
numpy>=1.24.0
|
| 7 |
matplotlib>=3.7.0
|
|
|
|
| 9 |
cvxpy>=1.4.0
|
| 10 |
rich>=13.7.0
|
| 11 |
rank-bm25>=0.2.2
|
| 12 |
+
pypdf>=3.17.0
|
| 13 |
fastapi>=0.110.0
|
| 14 |
uvicorn>=0.28.0
|
| 15 |
python-multipart>=0.0.9
|