Manisankarrr commited on
Commit
b8ea7be
·
1 Parent(s): 1a0f261

Initial Hugging Face deployment

Browse files
Files changed (2) hide show
  1. Dockerfile +13 -12
  2. README.md +11 -0
Dockerfile CHANGED
@@ -1,30 +1,31 @@
1
- # Use Node.js to build the React frontend
2
  FROM node:18 AS frontend-builder
 
3
  WORKDIR /app/frontend
 
4
  COPY frontend/package*.json ./
5
  RUN npm install
 
6
  COPY frontend/ .
7
  RUN npm run build
8
 
9
- # Use Python 3.10 for the FastAPI backend
 
10
  FROM python:3.10-slim
 
11
  WORKDIR /app
12
 
13
- # Install git and other system dependencies required for FAISS and git clone
14
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
15
 
16
- # Install Python dependencies
17
- COPY backend/requirements.txt ./
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy backend code
21
- COPY backend/ ./backend/
22
 
23
- # Copy the built React frontend from the previous stage
24
  COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
25
 
26
- # Expose port 7860 (required by Hugging Face)
27
  EXPOSE 7860
28
 
29
- # Run the FastAPI server
30
- CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # ---------- Frontend Build ----------
2
  FROM node:18 AS frontend-builder
3
+
4
  WORKDIR /app/frontend
5
+
6
  COPY frontend/package*.json ./
7
  RUN npm install
8
+
9
  COPY frontend/ .
10
  RUN npm run build
11
 
12
+
13
+ # ---------- Backend ----------
14
  FROM python:3.10-slim
15
+
16
  WORKDIR /app
17
 
18
+ RUN apt-get update && \
19
+ apt-get install -y git && \
20
+ rm -rf /var/lib/apt/lists/*
21
 
22
+ COPY backend/requirements.txt .
 
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
+ COPY backend ./backend
 
26
 
 
27
  COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
28
 
 
29
  EXPOSE 7860
30
 
31
+ CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # RepoAnalyzer 🧙‍♂️
2
 
3
  > AI-powered code documentation and search agent — paste a GitHub URL, get professional docs in seconds.
 
1
+ ---
2
+ title: RepoAnalyzer
3
+ emoji: ⚡
4
+ colorFrom: yellow
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ short_description: analyze repo and provide documentation about repo
9
+ ---
10
+
11
+
12
  # RepoAnalyzer 🧙‍♂️
13
 
14
  > AI-powered code documentation and search agent — paste a GitHub URL, get professional docs in seconds.