Spaces:
Running
Running
owenkaplinsky
commited on
Commit
·
d3b86ed
1
Parent(s):
6f26de3
Update requirements.txt
Browse files- Dockerfile +27 -0
- requirements.txt +3 -1
Dockerfile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Base image
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Install Node.js and npm
|
| 5 |
+
RUN apt-get update && apt-get install -y nodejs npm
|
| 6 |
+
|
| 7 |
+
# Copy entire repo into container
|
| 8 |
+
WORKDIR /app
|
| 9 |
+
COPY . .
|
| 10 |
+
|
| 11 |
+
# Install Python dependencies (if any)
|
| 12 |
+
RUN pip install -r requirements.txt || true
|
| 13 |
+
|
| 14 |
+
# Change working directory to the project folder for Node commands
|
| 15 |
+
WORKDIR /app/project
|
| 16 |
+
|
| 17 |
+
# Install Node dependencies
|
| 18 |
+
RUN npm install
|
| 19 |
+
|
| 20 |
+
# Build frontend
|
| 21 |
+
RUN npm run build
|
| 22 |
+
|
| 23 |
+
# Expose the port your app uses (usually 7860 or 8080)
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
|
| 26 |
+
# Start the app (npm start inside project)
|
| 27 |
+
CMD ["npm", "run", "start"]
|
requirements.txt
CHANGED
|
@@ -1,3 +1,5 @@
|
|
| 1 |
gradio
|
| 2 |
dotenv
|
| 3 |
-
openai
|
|
|
|
|
|
|
|
|
| 1 |
gradio
|
| 2 |
dotenv
|
| 3 |
+
openai
|
| 4 |
+
requests
|
| 5 |
+
colorama
|