Spaces:
Paused
Paused
sachin
commited on
Commit
·
47ca5c1
1
Parent(s):
6031d9b
add -hf token
Browse files- Dockerfile +23 -24
Dockerfile
CHANGED
@@ -1,39 +1,38 @@
|
|
1 |
-
# Use official NVIDIA CUDA base image with Ubuntu
|
2 |
FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04
|
3 |
-
|
4 |
-
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Install system dependencies
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
-
python3
|
10 |
-
python3-dev \
|
11 |
git \
|
|
|
|
|
|
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
RUN
|
19 |
|
20 |
-
|
21 |
-
RUN
|
22 |
-
fastapi \
|
23 |
-
uvicorn \
|
24 |
-
diffusers \
|
25 |
-
huggingface_hub \
|
26 |
-
safetensors
|
27 |
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
|
38 |
# Run the server
|
39 |
CMD ["uvicorn", "server.py:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
1 |
FROM nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04
|
|
|
|
|
2 |
WORKDIR /app
|
3 |
|
|
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
+
python3 \
|
6 |
+
python3-pip python3-distutils python3-dev python3-venv\
|
7 |
git \
|
8 |
+
ffmpeg \
|
9 |
+
sudo wget curl software-properties-common build-essential gcc g++ \
|
10 |
+
&& ln -s /usr/bin/python3 /usr/bin/python \
|
11 |
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
14 |
+
ENV PATH="/root/.cargo/bin:${PATH}"
|
15 |
|
16 |
+
RUN export CC=/usr/bin/gcc
|
17 |
+
RUN export CXX=/usr/bin/g++
|
18 |
|
19 |
+
RUN pip install --upgrade pip setuptools setuptools-rust torch
|
20 |
+
RUN pip install flash-attn --no-build-isolation
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
COPY requirements.txt .
|
23 |
+
#RUN pip install --no-cache-dir torch==2.6.0 torchvision
|
24 |
+
#RUN pip install --no-cache-dir transformers
|
25 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
26 |
+
#RUN pip install git+https://github.com/ai4bharat/IndicF5.git
|
27 |
|
28 |
+
COPY . .
|
29 |
+
|
30 |
+
RUN useradd -ms /bin/bash appuser \
|
31 |
+
&& chown -R appuser:appuser /app
|
32 |
|
33 |
+
USER appuser
|
34 |
+
|
35 |
+
EXPOSE 7860
|
36 |
|
37 |
# Run the server
|
38 |
CMD ["uvicorn", "server.py:app", "--host", "0.0.0.0", "--port", "7860"]
|