muralipala1504 commited on
Commit
314f196
·
1 Parent(s): 25c15c9

Add Dockerfile and docker-compose.yml for deepshell-ui container setup

Browse files
Files changed (2) hide show
  1. deepshell-backend/Dockerfile +12 -16
  2. 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 only necessary files first for caching
6
- COPY setup.py requirements.txt pyproject.toml README.md /app/
7
 
8
- # Copy source code before installing
9
- COPY deepshell /app/deepshell
10
- COPY docs /app/docs
 
11
 
12
- RUN apt-get update && apt-get install -y --no-install-recommends \
13
- build-essential \
14
- && rm -rf /var/lib/apt/lists/*
15
 
16
- RUN pip install --upgrade pip
17
- RUN pip install .
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