Skip to content

Commit 4a356f4

Browse files
committed
FIxed DOckerfile not working with latest changes
1 parent 1cd5c3e commit 4a356f4

File tree

4 files changed

+79
-28
lines changed

4 files changed

+79
-28
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM python:3.11-slim
2+
3+
# Set environment variables
4+
ENV PYTHONDONTWRITEBYTECODE=1 \
5+
PYTHONUNBUFFERED=1 \
6+
PYTHONPATH=/app
7+
8+
WORKDIR /app
9+
10+
# Install system dependencies
11+
RUN apt-get update && apt-get install -y \
12+
git \
13+
&& rm -rf /var/lib/apt/lists/*
14+
15+
# Copy and install Python dependencies
16+
COPY pyproject.toml ./
17+
RUN pip install --no-cache-dir -e ".[dev,examples]"
18+
19+
# Copy source code
20+
COPY . .
21+
22+
# Create non-root user
23+
RUN useradd --create-home --shell /bin/bash fit
24+
RUN chown -R fit:fit /app
25+
USER fit
26+
27+
# Default command
28+
CMD ["python", "-m", "pytest", "tests/"]

docker-compose.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: '3.8'
2+
3+
services:
4+
# Main development environment
5+
fit:
6+
build: .
7+
volumes:
8+
- .:/app
9+
- fit_cache:/home/fit/.cache
10+
environment:
11+
- PYTHONPATH=/app
12+
command: bash
13+
14+
# Run tests
15+
test:
16+
build: .
17+
volumes:
18+
- .:/app
19+
command: python -m pytest tests/ -v
20+
21+
# Jupyter notebook server
22+
jupyter:
23+
build: .
24+
volumes:
25+
- .:/app
26+
- fit_cache:/home/fit/.cache
27+
ports:
28+
- "8888:8888"
29+
environment:
30+
- JUPYTER_ENABLE_LAB=yes
31+
command: >
32+
jupyter lab
33+
--ip=0.0.0.0
34+
--port=8888
35+
--no-browser
36+
--allow-root
37+
--ServerApp.token=''
38+
--ServerApp.password=''
39+
--ServerApp.allow_origin='*'
40+
41+
# Development with hot reload
42+
dev:
43+
build: .
44+
volumes:
45+
- .:/app
46+
- fit_cache:/home/fit/.cache
47+
environment:
48+
- PYTHONPATH=/app
49+
stdin_open: true
50+
tty: true
51+
command: bash

docker/Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

docker/docker-compose.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)