Skip to content

Commit

Permalink
Update docker for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejcyrkunov committed Oct 12, 2024
1 parent adaa55f commit 5003baa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
19 changes: 18 additions & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
FROM python:3.12-alpine
FROM python:3.12-slim

RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
libffi-dev \
python3-dev \
&& apt-get clean

RUN apt-get update && apt-get install -y libgl1-mesa-glx libglu1-mesa libglib2.0-0

RUN pip install --no-cache-dir --upgrade pip

# Устанавливаем PyTorch и torchvision для CPU
# RUN pip install --no-cache-dir torch torchvision

# Устанавливаем OpenCV (легковесная версия без GUI)
# RUN pip install --no-cache-dir opencv-python-headless

WORKDIR /drone-ai-backend

Expand Down
5 changes: 5 additions & 0 deletions docker-compose.local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ services:
build: backend/
ports:
- '8000:8000'

drone-ai-frontend:
build: frontend/
ports:
- '3000:3000'
5 changes: 5 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ services:
image: andrewlimit/ai-backend:latest
ports:
- '8000:8000'

drone-ai-frontend:
build: andrewlimit/ai-frontend:latest
ports:
- '3000:3000'

0 comments on commit 5003baa

Please sign in to comment.