FJDorfner commited on
Commit
6a5f0f7
·
verified ·
1 Parent(s): ac79333

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory to /app
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies including curl
8
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Download the model files from Zenodo
11
+ RUN curl -o classification_model.ckpt -L https://zenodo.org/record/11116990/files/classification_model.ckpt
12
+ RUN curl -o segmentation_model.pt -L https://zenodo.org/record/11116990/files/segmentation_model.pt
13
+
14
+ # Copy the current directory contents into the container at /app
15
+ COPY . /app
16
+
17
+ # Install any needed packages specified in requirements.txt
18
+
19
+ RUN pip install -r /app/requirements.txt && \
20
+ pip uninstall opencv-python -y && \
21
+ pip install opencv-contrib-python-headless==4.5.5.64
22
+
23
+ # Make port 8080 available to the world outside this container
24
+ EXPOSE 8080
25
+
26
+ # Run app.py when the container launches
27
+ CMD ["python", "app.py"]
28
+