Commit
·
4439c97
1
Parent(s):
b7cebe5
modifying package versions, updating Dockerfile
Browse files- Dockerfile +14 -13
- requirements.txt +10 -8
Dockerfile
CHANGED
@@ -1,15 +1,24 @@
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
-
FROM python:3.12
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Set up a new user named "user" with user ID 1000
|
5 |
RUN useradd -m -u 1000 user
|
6 |
|
|
|
|
|
|
|
7 |
# Switch to the "user" user
|
8 |
USER user
|
9 |
|
10 |
# Set home to the user's home directory
|
11 |
ENV HOME=/home/user \
|
12 |
-
|
13 |
|
14 |
# Set the working directory to the user's home directory
|
15 |
WORKDIR $HOME/app
|
@@ -23,20 +32,12 @@ COPY --chown=user . $HOME/app
|
|
23 |
# Install any needed packages specified in requirements.txt
|
24 |
RUN pip install --no-cache-dir -r requirements.txt
|
25 |
|
26 |
-
|
27 |
-
apt-get install wget
|
28 |
-
|
29 |
-
RUN wget https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_lnx.zip &&\
|
30 |
-
unzip dcm2niix_lnx.zip &&\
|
31 |
-
cp dcm2niix /usr/local/bin
|
32 |
-
|
33 |
RUN wget -O scaling_factors.csv https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/scaling_factors.csv
|
34 |
-
|
35 |
-
RUN wget -O metadata_only_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/metadata_only_model.zip
|
36 |
RUN wget -O images_only_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/images_only_model.zip
|
37 |
RUN wget -O images_and_metadata_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/images_and_metadata_model.zip
|
38 |
|
39 |
-
|
40 |
RUN unzip "metadata_only_model.zip" -d "metadata_only_model/"
|
41 |
RUN unzip "images_only_model.zip" -d "images_only_model/"
|
42 |
RUN unzip "images_and_metadata_model.zip" -d "images_and_metadata_model/"
|
@@ -54,4 +55,4 @@ maxMessageSize = 2000\n\
|
|
54 |
EXPOSE 8501
|
55 |
|
56 |
# Run filter_data_app.py when the container launches
|
57 |
-
CMD streamlit run app.py
|
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.10.12
|
3 |
+
|
4 |
+
RUN apt-get update && apt-get install -y unzip wget
|
5 |
+
|
6 |
+
RUN wget https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_lnx.zip && \
|
7 |
+
unzip dcm2niix_lnx.zip && \
|
8 |
+
cp dcm2niix /usr/local/bin
|
9 |
|
10 |
# Set up a new user named "user" with user ID 1000
|
11 |
RUN useradd -m -u 1000 user
|
12 |
|
13 |
+
# Create the app directory and set the correct permissions
|
14 |
+
RUN mkdir -p /home/user/app && chown -R user:user /home/user/app
|
15 |
+
|
16 |
# Switch to the "user" user
|
17 |
USER user
|
18 |
|
19 |
# Set home to the user's home directory
|
20 |
ENV HOME=/home/user \
|
21 |
+
PATH=/home/user/.local/bin:$PATH
|
22 |
|
23 |
# Set the working directory to the user's home directory
|
24 |
WORKDIR $HOME/app
|
|
|
32 |
# Install any needed packages specified in requirements.txt
|
33 |
RUN pip install --no-cache-dir -r requirements.txt
|
34 |
|
35 |
+
# Download files as the non-root user
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
RUN wget -O scaling_factors.csv https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/scaling_factors.csv
|
37 |
+
RUN wget -O metadata_only_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/metadata_only_model.zip
|
|
|
38 |
RUN wget -O images_only_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/images_only_model.zip
|
39 |
RUN wget -O images_and_metadata_model.zip https://github.com/deepakri201/DICOMScanClassification/releases/download/v1.0.0/images_and_metadata_model.zip
|
40 |
|
|
|
41 |
RUN unzip "metadata_only_model.zip" -d "metadata_only_model/"
|
42 |
RUN unzip "images_only_model.zip" -d "images_only_model/"
|
43 |
RUN unzip "images_and_metadata_model.zip" -d "images_and_metadata_model/"
|
|
|
55 |
EXPOSE 8501
|
56 |
|
57 |
# Run filter_data_app.py when the container launches
|
58 |
+
CMD streamlit run app.py
|
requirements.txt
CHANGED
@@ -1,14 +1,16 @@
|
|
1 |
-
pydicom
|
2 |
-
polars
|
3 |
-
pyarrow
|
4 |
duckdb
|
5 |
-
pandas
|
6 |
streamlit
|
7 |
-
idc-index
|
8 |
-
SimpleITK
|
9 |
-
tensorflow
|
10 |
papermill
|
11 |
ipykernel
|
12 |
ipython
|
13 |
ipywidgets
|
14 |
-
nibabel
|
|
|
|
|
|
|
|
|
|
1 |
+
pydicom==2.4.4
|
|
|
|
|
2 |
duckdb
|
3 |
+
pandas==2.0.3
|
4 |
streamlit
|
5 |
+
idc-index==0.5.9
|
6 |
+
SimpleITK==2.3.1
|
7 |
+
tensorflow==2.15.0
|
8 |
papermill
|
9 |
ipykernel
|
10 |
ipython
|
11 |
ipywidgets
|
12 |
+
nibabel==4.0.2
|
13 |
+
matplotlib==3.7.1
|
14 |
+
scikit-learn==1.2.2
|
15 |
+
sklearn-pandas
|
16 |
+
numpy==1.25.2
|