Sanket17 commited on
Commit
f932697
·
verified ·
1 Parent(s): a45cb31

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -2
Dockerfile CHANGED
@@ -2,7 +2,10 @@ FROM registry.hf.space/microsoft-omniparser:latest
2
 
3
  USER root
4
 
5
- # Install CUDA dependencies
 
 
 
6
  RUN apt update -q && apt install -y --no-install-recommends \
7
  ca-certificates wget libgl1 \
8
  && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
@@ -21,5 +24,5 @@ COPY weights.py weights.py
21
  # Expose application port
22
  EXPOSE 7860
23
 
24
- # Set the entrypoint for the container
25
  CMD ["bash", "-c", "python weights.py && uvicorn main:app --host 0.0.0.0 --port 7860"]
 
2
 
3
  USER root
4
 
5
+ # Set proper permissions for /tmp
6
+ RUN chmod 1777 /tmp
7
+
8
+ # Install CUDA dependencies and system packages
9
  RUN apt update -q && apt install -y --no-install-recommends \
10
  ca-certificates wget libgl1 \
11
  && wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \
 
24
  # Expose application port
25
  EXPOSE 7860
26
 
27
+ # Run weights.py and start the FastAPI server
28
  CMD ["bash", "-c", "python weights.py && uvicorn main:app --host 0.0.0.0 --port 7860"]