Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12
|
2 |
+
|
3 |
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
4 |
+
|
5 |
+
RUN useradd -m -u 1000 user
|
6 |
+
USER user
|
7 |
+
ENV HOME=/home/user \
|
8 |
+
PATH=/home/user/.local/bin:$PATH
|
9 |
+
|
10 |
+
# Copy the datadex project and dependencies
|
11 |
+
RUN git clone https://github.com/datonic/datadex.git $HOME/app && \
|
12 |
+
cd $HOME/app && \
|
13 |
+
chown -R user:user .
|
14 |
+
|
15 |
+
# Create a data directory and set ownership
|
16 |
+
RUN mkdir -p $HOME/app/data && chown -R user:user $HOME/app/data
|
17 |
+
|
18 |
+
# Set the working directory
|
19 |
+
WORKDIR $HOME/app
|
20 |
+
|
21 |
+
# Sync the dependencies
|
22 |
+
RUN [ "uv", "sync" ]
|
23 |
+
|
24 |
+
# Run the Dagster server
|
25 |
+
CMD [ "uv", "run", "dagster-webserver", "--read-only", "-h", "0.0.0.0", "-p", "7860" ]
|