Spaces:
Runtime error
Runtime error
ismailelghazi commited on
Commit ·
05a0510
1
Parent(s): 6775485
zbi
Browse files- Dockerfile +6 -9
- README.md +2 -2
Dockerfile
CHANGED
|
@@ -1,23 +1,20 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies (needed for psycopg2
|
| 8 |
-
RUN apt-get update && apt-get install -y
|
| 9 |
-
libpq-dev \
|
| 10 |
-
gcc \
|
| 11 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Copy requirements and install Python
|
| 14 |
COPY requirements.txt .
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
# Copy
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
# Expose
|
| 21 |
EXPOSE 7860
|
| 22 |
|
| 23 |
# Run FastAPI app
|
|
|
|
| 1 |
+
# Base Python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system dependencies (needed for psycopg2)
|
| 8 |
+
RUN apt-get update && apt-get install -y libpq-dev gcc && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# Copy requirements and install Python packages
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Copy the app code
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Expose Hugging Face default port
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
# Run FastAPI app
|
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: pink
|
|
@@ -9,4 +9,4 @@ app_file: app/main.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
This Hugging Face Space hosts my FastAPI
|
|
|
|
| 1 |
---
|
| 2 |
+
title: TalAIt FastAPI
|
| 3 |
emoji: 🚀
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: pink
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
This Hugging Face Space hosts my FastAPI backend connected to a Supabase PostgreSQL database.
|