Yehor commited on
Commit
fb2cd10
·
verified ·
1 Parent(s): 4d6b1e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -31,7 +31,7 @@ RUN apt-get update && \
31
 
32
  RUN useradd -m -u 1001 hf-space
33
 
34
- # USER hf-space
35
 
36
  ENV HOME=/home/hf-space \
37
  PATH=/home/hf-space/.local/bin:${PATH} \
@@ -43,8 +43,7 @@ ENV HOME=/home/hf-space \
43
  GRADIO_THEME=huggingface \
44
  SYSTEM=spaces
45
 
46
- # COPY --chown=1001 . ${HOME}/app
47
- COPY . ${HOME}/app
48
 
49
  WORKDIR ${HOME}/app
50
 
@@ -52,13 +51,15 @@ ENV UV_PYTHON_INSTALL_DIR=${HOME}/app/uv-pythons
52
 
53
  RUN wget -qO- https://astral.sh/uv/install.sh | sh
54
 
 
 
55
  RUN uv venv --python 3.13.2
56
 
57
  RUN uv pip install --no-cache-dir -r /home/hf-space/app/requirements.txt
58
 
59
- # RUN chown -R hf-space:hf-space ${HOME}/app
60
 
61
- #RUN ls -lha /home/hf-space/
62
- #RUN ls -lha /home/hf-space/app/uv-pythons/cpython-3.13.2-linux-x86_64-gnu
63
 
64
  CMD ["uv", "run", "--no-cache", "--no-config", "app.py"]
 
31
 
32
  RUN useradd -m -u 1001 hf-space
33
 
34
+ USER hf-space
35
 
36
  ENV HOME=/home/hf-space \
37
  PATH=/home/hf-space/.local/bin:${PATH} \
 
43
  GRADIO_THEME=huggingface \
44
  SYSTEM=spaces
45
 
46
+ COPY --chown=1001 . ${HOME}/app
 
47
 
48
  WORKDIR ${HOME}/app
49
 
 
51
 
52
  RUN wget -qO- https://astral.sh/uv/install.sh | sh
53
 
54
+ RUN chmod -R a+rx /home/hf-space/app/uv-pythons
55
+
56
  RUN uv venv --python 3.13.2
57
 
58
  RUN uv pip install --no-cache-dir -r /home/hf-space/app/requirements.txt
59
 
60
+ RUN chown -R hf-space:hf-space ${HOME}/app
61
 
62
+ RUN ls -lda /home/hf-space/
63
+ RUN ls -lda /home/hf-space/app/uv-pythons/cpython-3.13.2-linux-x86_64-gnu
64
 
65
  CMD ["uv", "run", "--no-cache", "--no-config", "app.py"]