-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 838 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
# Clone OpenEnv
RUN git clone https://github.com/meta-pytorch/OpenEnv.git /app/OpenEnv
# Install dependencies
RUN pip install --no-cache-dir \
fastapi \
"uvicorn[standard]" \
pydantic \
openai \
requests \
openenv-core
# Install your project requirements
COPY . .
RUN pip install --no-cache-dir -r server/requirements.txt
# Install OpenEnv (editable)
RUN pip install --no-cache-dir -e /app/OpenEnv
# Set Python path
ENV PYTHONPATH="/app:/app/OpenEnv:/app/OpenEnv/src"
# Non-root user
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
USER appuser
EXPOSE 7860
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]