Spaces:
Running
Running
muralipala1504 commited on
Commit ·
314f196
1
Parent(s): 25c15c9
Add Dockerfile and docker-compose.yml for deepshell-ui container setup
Browse files- deepshell-backend/Dockerfile +12 -16
- docker-compose.yml +17 -0
deepshell-backend/Dockerfile
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Copy
|
| 6 |
-
COPY
|
| 7 |
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
RUN useradd -m deepshelluser
|
| 20 |
-
USER deepshelluser
|
| 21 |
-
|
| 22 |
-
# Default command if no entrypoint override
|
| 23 |
-
CMD ["--help"]
|
|
|
|
| 1 |
+
# Use official Python slim image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy backend source code and config files
|
| 8 |
+
COPY . /app
|
| 9 |
|
| 10 |
+
# Install bash and Python dependencies, then install your package
|
| 11 |
+
RUN apt-get update && apt-get install -y bash \
|
| 12 |
+
&& pip install --no-cache-dir -r requirements.txt \
|
| 13 |
+
&& pip install --no-cache-dir .
|
| 14 |
|
| 15 |
+
# Expose backend port (adjust if needed)
|
| 16 |
+
EXPOSE 8000
|
|
|
|
| 17 |
|
| 18 |
+
# Default command: start bash shell
|
| 19 |
+
CMD ["/bin/bash"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
deepshell-backend:
|
| 3 |
+
build:
|
| 4 |
+
context: ./deepshell-backend
|
| 5 |
+
dockerfile: Dockerfile
|
| 6 |
+
container_name: deepshell-backend
|
| 7 |
+
tty: true
|
| 8 |
+
stdin_open: true
|
| 9 |
+
environment:
|
| 10 |
+
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
| 11 |
+
volumes:
|
| 12 |
+
- ./deepshell-backend:/app
|
| 13 |
+
# Uncomment to persist logs/config
|
| 14 |
+
# - ./logs:/app/logs
|
| 15 |
+
ports:
|
| 16 |
+
- "8000:8000"
|
| 17 |
+
command: /bin/bash
|