xRayon commited on
Commit
eedb021
·
verified ·
1 Parent(s): 5512323

Upload 3 files

Browse files
Files changed (3) hide show
  1. .dockerignore +6 -0
  2. .gitignore +1 -0
  3. Dockerfile +24 -0
.dockerignore ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ AI Images Detector/train
2
+ AI Images Detector/test
3
+ AI Images Detector/engine.py
4
+ AI Images Detector/data_loaders.py
5
+ AI Images Detector/checkpoints/*.pth
6
+ __pycache__
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ *.pth
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build from repo root: docker build -t ai-image-detector .
2
+ FROM python:3.13-slim
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ curl \
6
+ && rm -rf /var/lib/apt/lists/*
7
+ # curl for healthcheck
8
+ # rm to remove apt cache, lighter image
9
+
10
+ COPY ["AI Images Detector/requirements.txt", "."]
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # this after copy requirements.txt so that if we change something it wont rerun pip install again when building
14
+ COPY ["AI Images Detector", "."]
15
+
16
+ # checkpoints are large, we'll create a directory and mount at runtime (see README)
17
+ RUN mkdir -p checkpoints
18
+
19
+ EXPOSE 8501
20
+
21
+ # periodic healthcheck
22
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
23
+
24
+ CMD ["streamlit", "run", "inference.py", "--server.address=0.0.0.0", "--server.port=8501"] # server.address=0.0.0.0 allows connection outside of the container