mikonvergence commited on
Commit
1fc3b38
·
verified ·
1 Parent(s): fb24c21

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -4,10 +4,11 @@ FROM continuumio/miniconda3
4
  RUN useradd -m -u 1000 user
5
 
6
  # 2. Set Environment Variables
7
- # LD_LIBRARY_PATH is crucial here. It helps Python find the MKL libraries we are about to install.
8
  ENV HOME=/home/user \
9
  PATH=/opt/conda/envs/app_env/bin:$PATH \
10
- LD_LIBRARY_PATH=/opt/conda/envs/app_env/lib:$LD_LIBRARY_PATH
 
11
 
12
  # 3. Working Directory
13
  WORKDIR /home/user/app
@@ -15,8 +16,7 @@ WORKDIR /home/user/app
15
  # 4. Create Conda Env
16
  RUN conda create -n app_env python=3.9 wget -y
17
 
18
- # 5. Install Conda Packages (FIXED)
19
- # We explicitly install 'mkl' to satisfy the missing shared object error.
20
  RUN conda install -n app_env -c pytorch -c nvidia -c conda-forge faiss-gpu=1.7.4 mkl=2021 blas=1.0=mkl -y && \
21
  conda clean -ya
22
 
@@ -26,7 +26,9 @@ RUN pip install --no-cache-dir --upgrade pip && \
26
  pip install --no-cache-dir -r requirements.txt
27
 
28
  # 7. Fix Permissions
29
- RUN chown -R user:user /home/user/app
 
 
30
 
31
  # 8. Switch to User
32
  USER user
 
4
  RUN useradd -m -u 1000 user
5
 
6
  # 2. Set Environment Variables
7
+ # ADDED: SOLARA_PROXY_CACHE_DIR so Solara writes to a folder we own, not root.
8
  ENV HOME=/home/user \
9
  PATH=/opt/conda/envs/app_env/bin:$PATH \
10
+ LD_LIBRARY_PATH=/opt/conda/envs/app_env/lib:$LD_LIBRARY_PATH \
11
+ SOLARA_PROXY_CACHE_DIR=/home/user/.solara_cache
12
 
13
  # 3. Working Directory
14
  WORKDIR /home/user/app
 
16
  # 4. Create Conda Env
17
  RUN conda create -n app_env python=3.9 wget -y
18
 
19
+ # 5. Install Faiss via Conda (Pinned MKL)
 
20
  RUN conda install -n app_env -c pytorch -c nvidia -c conda-forge faiss-gpu=1.7.4 mkl=2021 blas=1.0=mkl -y && \
21
  conda clean -ya
22
 
 
26
  pip install --no-cache-dir -r requirements.txt
27
 
28
  # 7. Fix Permissions
29
+ # We authorize the user for the app folder AND the new cache location
30
+ RUN mkdir /home/user/.solara_cache && \
31
+ chown -R user:user /home/user/app /home/user/.solara_cache
32
 
33
  # 8. Switch to User
34
  USER user