carlosgomes98 commited on
Commit
7645c5b
1 Parent(s): ef84153

update setuptools

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -22
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
- FROM ubuntu:18.04
2
 
3
 
4
  RUN apt-get update && apt-get install --no-install-recommends -y \
5
  build-essential \
6
- python3.8 \
7
- python3-pip \
8
- python3-setuptools \
9
  git \
10
  wget \
11
  && apt-get clean && rm -rf /var/lib/apt/lists/*
@@ -15,19 +15,19 @@ RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
15
  WORKDIR /code
16
 
17
  # add conda
18
- RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -P /code/
19
- RUN chmod 777 /code/Miniconda3-latest-Linux-x86_64.sh
20
- RUN /code/Miniconda3-latest-Linux-x86_64.sh -b -p /code/miniconda
21
- ENV PATH="/code/miniconda/bin:${PATH}"
22
 
23
- RUN groupadd miniconda
24
- RUN chgrp -R miniconda /code/miniconda/
25
- RUN chmod 770 -R /code/miniconda/
26
 
27
 
28
  # Set up a new user named "user" with user ID 1000
29
  RUN useradd -m -u 1000 user
30
- RUN adduser user miniconda
31
 
32
  # Switch to the "user" user
33
  USER user
@@ -42,35 +42,36 @@ ENV HOME=/home/user \
42
  GRADIO_THEME=huggingface \
43
  SYSTEM=spaces
44
 
45
- RUN conda install python=3.8
46
 
47
- RUN pip3 install setuptools-rust
48
 
49
- RUN conda install pillow -y
50
 
51
- RUN pip3 install torch==1.11.0+cu115 torchvision==0.12.0+cu115 --extra-index-url https://download.pytorch.org/whl/cu115
52
 
53
- RUN pip3 install openmim
54
 
55
- RUN conda install -c conda-forge gradio -y
 
56
 
57
  WORKDIR /home/user
58
 
59
  RUN --mount=type=secret,id=git_token,mode=0444,required=true \
60
- git clone --branch mmseg-only https://$(cat /run/secrets/git_token)@github.com/NASA-IMPACT/hls-foundation-os.git
61
 
62
 
63
  WORKDIR hls-foundation-os
64
 
65
- RUN pip3 install -e .
66
 
67
  RUN mim install mmcv-full==1.6.2 -f https://download.openmmlab.com/mmcv/dist/11.5/1.11.0/index.html
68
 
69
- RUN pip3 install rasterio scikit-image
70
  # Set the working directory to the user's home directory
71
  WORKDIR $HOME/app
72
 
73
- ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/miniconda/lib"
74
 
75
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
76
  COPY --chown=user . $HOME/app
 
1
+ FROM --platform=linux/amd64 python:3.8
2
 
3
 
4
  RUN apt-get update && apt-get install --no-install-recommends -y \
5
  build-essential \
6
+ # python3.8 \
7
+ # python3-pip \
8
+ # python3-setuptools \
9
  git \
10
  wget \
11
  && apt-get clean && rm -rf /var/lib/apt/lists/*
 
15
  WORKDIR /code
16
 
17
  # add conda
18
+ # RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -P /code/
19
+ # RUN chmod 777 /code/Miniconda3-latest-Linux-x86_64.sh
20
+ # RUN /code/Miniconda3-latest-Linux-x86_64.sh -b -p /code/miniconda
21
+ # ENV PATH="/code/miniconda/bin:${PATH}"
22
 
23
+ # RUN groupadd miniconda
24
+ # RUN chgrp -R miniconda /code/miniconda/
25
+ # RUN chmod 770 -R /code/miniconda/
26
 
27
 
28
  # Set up a new user named "user" with user ID 1000
29
  RUN useradd -m -u 1000 user
30
+ # RUN adduser user miniconda
31
 
32
  # Switch to the "user" user
33
  USER user
 
42
  GRADIO_THEME=huggingface \
43
  SYSTEM=spaces
44
 
45
+ # RUN conda install python=3.8
46
 
47
+ RUN pip install setuptools-rust
48
 
49
+ RUN pip install pillow
50
 
51
+ RUN pip install torch==1.11.0+cu115 torchvision==0.12.0+cu115 --extra-index-url https://download.pytorch.org/whl/cu115
52
 
53
+ RUN pip install openmim
54
 
55
+ RUN pip install --upgrade setuptools
56
+ RUN pip install gradio
57
 
58
  WORKDIR /home/user
59
 
60
  RUN --mount=type=secret,id=git_token,mode=0444,required=true \
61
+ git clone --branch mmseg-only https://$(cat /run/secrets/git_token)@github.com/NASA-IMPACT/hls-foundation-os.git && git checkout 9968269915db8402bf4a6d0549df9df57d489e5a
62
 
63
 
64
  WORKDIR hls-foundation-os
65
 
66
+ RUN pip install -e .
67
 
68
  RUN mim install mmcv-full==1.6.2 -f https://download.openmmlab.com/mmcv/dist/11.5/1.11.0/index.html
69
 
70
+ RUN pip install rasterio scikit-image
71
  # Set the working directory to the user's home directory
72
  WORKDIR $HOME/app
73
 
74
+ # ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/miniconda/lib"
75
 
76
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
77
  COPY --chown=user . $HOME/app