Skip to content

Commit ee25a8e

Browse files
Merge pull request #10 from ahmed-n-abdeltwab/feature/make-modular
fix: Docker build issues and Python packaging
2 parents 1fdb2b4 + f3db2c0 commit ee25a8e

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ venv/
1212
.pytest_cache/
1313
.idea/
1414
.vscode/
15+
*.egg-info/
16+
build/
17+
dist/

Dockerfile

+9-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ USER appuser
4040
COPY --from=builder --chown=appuser:appuser /opt/venv /opt/venv
4141
ENV PATH="/opt/venv/bin:$PATH"
4242

43-
# Copy application files
44-
COPY --chown=appuser:appuser . .
45-
46-
# Install package in development mode
47-
RUN pip install -e .
43+
# Copy application files (excluding .dockerignore patterns)
44+
COPY --chown=appuser:appuser setup.py .
45+
COPY --chown=appuser:appuser pyproject.toml .
46+
COPY --chown=appuser:appuser requirements.txt .
47+
COPY --chown=appuser:appuser src/ ./src/
48+
COPY --chown=appuser:appuser config/ ./config/
49+
50+
# Install the package
51+
RUN pip install .
4852

4953
# Health check
5054
HEALTHCHECK --interval=30s --timeout=10s \

setup.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name="spyware-detector",
5+
version="0.1",
6+
packages=find_packages(),
7+
install_requires=[
8+
"pandas==1.5.3",
9+
"numpy==1.23.5",
10+
"scikit-learn==1.2.2",
11+
"PyYAML==6.0",
12+
],
13+
python_requires=">=3.9",
14+
)

0 commit comments

Comments
 (0)