Jarod Castillo commited on
Commit
b9d5300
·
1 Parent(s): 9afa40e

b0ss fix b0ss

Browse files
Files changed (2) hide show
  1. Dockerfile +50 -0
  2. requirements.txt +0 -1
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ git \
6
+ git-lfs \
7
+ ffmpeg \
8
+ libsm6 \
9
+ libxext6 \
10
+ cmake \
11
+ rsync \
12
+ libgl1 \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && git lfs install
15
+
16
+ WORKDIR /app
17
+
18
+ # Pin pip to a version that can handle omegaconf's invalid metadata
19
+ RUN pip install --no-cache-dir "pip<24.1"
20
+
21
+ # Install HuggingFace dependencies
22
+ RUN pip install --no-cache-dir \
23
+ datasets \
24
+ "huggingface-hub>=0.30" \
25
+ "hf-transfer>=0.1.4" \
26
+ "protobuf<4" \
27
+ "click<8.1" \
28
+ "pydantic~=1.0"
29
+
30
+ # Copy and install requirements
31
+ COPY requirements.txt .
32
+ RUN pip install --no-cache-dir -r requirements.txt
33
+
34
+ # Copy the rest of the application
35
+ COPY . .
36
+
37
+ # Create a non-root user for HuggingFace Spaces
38
+ RUN useradd -m -u 1000 user
39
+ USER user
40
+ ENV HOME=/home/user \
41
+ PATH=/home/user/.local/bin:$PATH
42
+
43
+ WORKDIR $HOME/app
44
+ COPY --chown=user . $HOME/app
45
+
46
+ # Expose the Streamlit port
47
+ EXPOSE 7860
48
+
49
+ # Run the Streamlit app
50
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
requirements.txt CHANGED
@@ -1,4 +1,3 @@
1
- pip<24.1
2
  torch~=2.0.1
3
  onnxruntime~=1.15.1
4
  onnxruntime-gpu~=1.15.1
 
 
1
  torch~=2.0.1
2
  onnxruntime~=1.15.1
3
  onnxruntime-gpu~=1.15.1