MAS-AI-0000 commited on
Commit
5f4eeb1
·
verified ·
1 Parent(s): ce287f9

Upload 3 files

Browse files
Files changed (3) hide show
  1. .dockerignore +13 -0
  2. dockerfile +34 -0
  3. requirements.txt +14 -0
.dockerignore ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # System files
2
+
3
+ .DS_Store
4
+
5
+ # Python cache
6
+
7
+ \*_/**pycache**/
8
+ _.pyc
9
+
10
+ # Local virtual environments
11
+
12
+ .venv/
13
+ venv/
dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python base image
2
+ FROM python:3.12
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ libgl1 \
11
+ libglib2.0-0 \
12
+ libsm6 \
13
+ libxext6 \
14
+ libxrender1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+
18
+ # Copy requirements file
19
+ COPY requirements.txt .
20
+
21
+ # Install Python dependencies
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ RUN python -c "import clip; clip.load('ViT-B/32', device = 'cpu', jit=False)"
25
+
26
+ # Copy the application code and models
27
+ COPY ./Apps ./Apps
28
+ COPY ./Lib/Models ./Models
29
+
30
+ # Expose the port
31
+ EXPOSE 8000
32
+
33
+ # Command to run the FastAPI application
34
+ CMD ["uvicorn", "Apps.app:app", "--host", "0.0.0.0", "--port", "8000"]
requirements.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fastapi
2
+ redis
3
+ types-redis
4
+ uvicorn
5
+ python-multipart
6
+ pillow
7
+ numpy
8
+ tensorflow
9
+ torch
10
+ transformers
11
+ opencv-contrib-python-headless>=4.7.0
12
+ git+https://github.com/openai/CLIP.git
13
+ scikit-learn
14
+ joblib