JohanDL commited on
Commit
03be022
1 Parent(s): 1ee4ff6

Adding deps

Browse files
Files changed (2) hide show
  1. Dockerfile +17 -2
  2. install_dependencies.sh +34 -0
Dockerfile CHANGED
@@ -1,16 +1,30 @@
1
  FROM continuumio/anaconda3:main
2
 
 
3
  WORKDIR /code
 
 
4
  COPY ./environment_docker.yml /code/environment_docker.yml
5
 
6
  # Create the environment using the environment.yml file
7
  RUN conda env create -f /code/environment_docker.yml
8
 
 
 
 
 
 
 
 
 
 
9
  # Set up a new user named "user" with user ID 1000
10
  RUN useradd -m -u 1000 user
 
11
  # Switch to the "user" user
12
  USER user
13
- # Set home to the user's home directory
 
14
  ENV HOME=/home/user \
15
  PYTHONPATH=$HOME/app \
16
  PYTHONUNBUFFERED=1 \
@@ -23,10 +37,11 @@ ENV HOME=/home/user \
23
  # Set the working directory to the user's home directory
24
  WORKDIR $HOME/app
25
 
26
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
27
  COPY --chown=user . $HOME/app
28
 
29
  # Make run.sh executable
30
  RUN chmod +x $HOME/app/run.sh
31
 
 
32
  CMD ["./run.sh"]
 
1
  FROM continuumio/anaconda3:main
2
 
3
+ # Set the working directory to /code
4
  WORKDIR /code
5
+
6
+ # Copy the environment.yml file into the container
7
  COPY ./environment_docker.yml /code/environment_docker.yml
8
 
9
  # Create the environment using the environment.yml file
10
  RUN conda env create -f /code/environment_docker.yml
11
 
12
+ # Copy the install_deps.sh script into the container
13
+ COPY ./install_deps.sh /code/install_deps.sh
14
+
15
+ # Make the install_deps.sh script executable
16
+ RUN chmod +x /code/install_deps.sh
17
+
18
+ # Run the install_deps.sh script
19
+ RUN /code/install_deps.sh
20
+
21
  # Set up a new user named "user" with user ID 1000
22
  RUN useradd -m -u 1000 user
23
+
24
  # Switch to the "user" user
25
  USER user
26
+
27
+ # Set home to the user's home directory and other environment variables
28
  ENV HOME=/home/user \
29
  PYTHONPATH=$HOME/app \
30
  PYTHONUNBUFFERED=1 \
 
37
  # Set the working directory to the user's home directory
38
  WORKDIR $HOME/app
39
 
40
+ # Copy the current directory contents into the container at $HOME/app and set the owner to the user
41
  COPY --chown=user . $HOME/app
42
 
43
  # Make run.sh executable
44
  RUN chmod +x $HOME/app/run.sh
45
 
46
+ # Command to run the application
47
  CMD ["./run.sh"]
install_dependencies.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Exit script if any command fails
4
+ set -e
5
+
6
+ # Update pip and install openmim
7
+ echo "Updating pip and installing openmim..."
8
+ pip install -U pip
9
+ pip install -U openmim
10
+
11
+ # Install packages using MIM
12
+ echo "Installing packages with MIM..."
13
+ mim install mmengine
14
+ pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.1/index.html
15
+ pip install git+https://github.com/open-mmlab/mmdetection.git@v3.3.0
16
+
17
+ # Install various Python packages using pip
18
+ echo "Installing various Python packages..."
19
+ pip install supervision
20
+ pip install transformers==4.38.2
21
+ pip install nltk
22
+ pip install h5py
23
+ pip install einops
24
+ pip install seaborn
25
+ pip install fairscale
26
+ pip install git+https://github.com/openai/CLIP.git
27
+ pip install git+https://github.com/siyuanliii/TrackEval.git
28
+ pip install git+https://github.com/SysCV/tet.git#subdirectory=teta
29
+ pip install git+https://github.com/scalabel/scalabel.git@scalabel-evalAPI
30
+ pip install git+https://github.com/TAO-Dataset/tao
31
+ pip install git+https://github.com/lvis-dataset/lvis-api.git
32
+
33
+
34
+ echo "All packages installed successfully!"