Spaces:
Running
Running
Yash Chauhan
commited on
Commit
·
5f6fe2c
1
Parent(s):
dba3c4d
[updated]
Browse files- Dockerfile +17 -8
Dockerfile
CHANGED
@@ -1,14 +1,23 @@
|
|
1 |
# Use an official Python image with CUDA support if using GPU
|
2 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
3 |
|
4 |
-
|
5 |
-
USER user
|
6 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
7 |
-
|
8 |
WORKDIR /app
|
9 |
|
10 |
-
|
11 |
-
RUN
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
|
|
|
|
1 |
# Use an official Python image with CUDA support if using GPU
|
2 |
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04
|
3 |
|
4 |
+
# Set working directory
|
|
|
|
|
|
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Install dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
python3-pip \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Copy the required files
|
13 |
+
COPY requirements.txt requirements.txt
|
14 |
+
COPY app.py app.py
|
15 |
+
|
16 |
+
# Install Python dependencies
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
|
19 |
+
# Expose port for FastAPI
|
20 |
+
EXPOSE 7860
|
21 |
|
22 |
+
# Run the application
|
23 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|