Dyno1307 commited on
Commit
2620d7d
·
verified ·
1 Parent(s): ff88581

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +21 -0
  2. requirements.txt +7 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10
2
+ FROM python:3.10
3
+
4
+ # Set working directory to /code
5
+ WORKDIR /code
6
+
7
+ # Copy requirements
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
+
13
+ # Copy the source code
14
+ COPY ./src /code/src
15
+
16
+ # Create a writable directory for caching/temp files if needed
17
+ RUN mkdir -p /code/temp && chmod 777 /code/temp
18
+
19
+ # Set the command to run the application
20
+ # Note: HF Spaces expects the app to run on port 7860
21
+ CMD ["uvicorn", "src.api.main:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ fastapi==0.109.2
2
+ uvicorn==0.27.1
3
+ python-multipart==0.0.9
4
+ tensorflow-cpu==2.15.0
5
+ pillow==10.2.0
6
+ numpy==1.26.4
7
+ opencv-python-headless==4.9.0.80