Create DockerFile
Browse files- DockerFile +30 -0
DockerFile
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM pytorch/pytorch:latest
|
2 |
+
|
3 |
+
# Set working directory
|
4 |
+
WORKDIR /app
|
5 |
+
|
6 |
+
# Install system dependencies
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
libgl1-mesa-glx \
|
9 |
+
libglib2.0-0
|
10 |
+
|
11 |
+
# Install Python dependencies
|
12 |
+
RUN pip install fastapi uvicorn python-dotenv pillow python-multipart
|
13 |
+
|
14 |
+
# Install Hugging Face libraries
|
15 |
+
RUN pip install transformers datasets tokenizers
|
16 |
+
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
+
|
19 |
+
# Install additional required libraries
|
20 |
+
RUN pip install byaldi qwen-vl-utils
|
21 |
+
|
22 |
+
# Copy your application code
|
23 |
+
COPY app.py .
|
24 |
+
COPY .env .
|
25 |
+
|
26 |
+
# Expose the port the app runs on
|
27 |
+
EXPOSE 8000
|
28 |
+
|
29 |
+
# Command to run the application
|
30 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|