Tremick commited on
Commit
ed222ab
·
verified ·
1 Parent(s): 623cb60

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -50
Dockerfile DELETED
@@ -1,50 +0,0 @@
1
- # Use NVIDIA CUDA base image for GPU support
2
- FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
3
-
4
- # Set environment variables
5
- ENV PYTHONUNBUFFERED=1 \
6
- PYTHONDONTWRITEBYTECODE=1 \
7
- DEBIAN_FRONTEND=noninteractive
8
-
9
- # Install system dependencies
10
- RUN apt-get update && apt-get install -y \
11
- python3-pip \
12
- python3-dev \
13
- git \
14
- wget \
15
- ffmpeg \
16
- libsm6 \
17
- libxext6 \
18
- && rm -rf /var/lib/apt/lists/*
19
-
20
- # Set working directory
21
- WORKDIR /app
22
-
23
- # Upgrade pip
24
- RUN pip3 install --no-cache-dir --upgrade pip
25
-
26
- # Install Python dependencies
27
- # We install torch first to ensure correct CUDA version
28
- RUN pip3 install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
29
-
30
- # Copy requirements and install
31
- COPY requirements.txt .
32
- RUN pip3 install --no-cache-dir -r requirements.txt
33
-
34
- # Create a user to run the application (Hugging Face Spaces requirement for security)
35
- RUN useradd -m -u 1000 user
36
- USER user
37
- ENV HOME=/home/user \
38
- PATH=/home/user/.local/bin:$PATH
39
-
40
- # Set working directory for the user
41
- WORKDIR $HOME/app
42
-
43
- # Copy the rest of the application code
44
- COPY --chown=user . $HOME/app
45
-
46
- # Expose the port (Hugging Face Spaces maps port 7860 by default)
47
- EXPOSE 7860
48
-
49
- # Command to run the application
50
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]