Giter Club home page Giter Club logo

Comments (14)

Yakabuff avatar Yakabuff commented on June 15, 2024

That error is from running this:

$ docker run \
  --name pgsql-dev \
  --network redarc \
  -e POSTGRES_PASSWORD=test1234 \
  -d \
  -v ${PWD}/postgres-docker:/var/lib/postgresql/data \
  -p 5432:5432 postgres 

The postgres container is trying to mount /applications/postgres-docker which isn't exported but you also shouldn't be running this in the /applications folder. Try setting the volume in /Users, /Volumes, /tmp or /private. Those paths seem to be exported by default according to https://stackoverflow.com/questions/45122459/mounts-denied-the-paths-are-not-shared-from-os-x-and-are-not-known-to-docke. Seems to be a mac related issue

eg:

$ docker run \
  --name pgsql-dev \
  --network redarc \
  -e POSTGRES_PASSWORD=test1234 \
  -d \
  -v /tmp/postgres-docker:/var/lib/postgresql/data \
  -p 5432:5432 postgres 

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

@Yakabuff Thanks for your response!

With the command above, I was able to run docker!
However, while I build 'redarc' using docker build . -t redarc , I got error this

"ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount58663604/Dockerfile: no such file or directory"

I tried to access that address ( /var/lib/docker ..), but I couldn't make it.
Thanks in advance :)

Best,
Sangpil

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

I think you're running docker build . -t redarc in the wrong directory. It's looking for Dockerfile in /var/lib/docker/tmp/buildkit-mount58663604/Dockerfile which does not sound correct

Can you make sure you running docker build . -t redarc in the redarc project folder? (Folder that was created when you cloned the repo with the Dockerfile)

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

Hmm, I think I still don't get it how to install redarc in the redarc project folder.
I've tried to move to redarc project folder, but I couldn't find the way to move that folder nor the location of the folder.

Is there any way to find the redarc project folder?

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

@philz0918 Can you try this?

cd

git clone https://github.com/Yakabuff/redarc.git

cd redarc

docker build . -t redarc

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

@Yakabuff Thanks for your help!
I think now it works fine:)

I have one more question, I think I need to create comment_file/submission_file to get comment/submission.
I'm guessing these files have JSON format
For example,
{ "subreddit": "conservative" "body":... }

I think we can use before/after to set the time range, however, I don't think it can run with load_comments/submission.py .

Would you please provide an example for submission_file.txt?

Once again, thank you so much.

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

@philz0918
https://github.com/Yakabuff/redarc#download-pushshift-dumps

https://the-eye.eu/redarcs

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

@Yakabuff Sorry for bothering you.

I was wondering how I run my SQL file onto the db here.

Thanks.

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

Use the postgres client: psql -h localhost -U postgres -a -f file.sql

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

Not sure why you would need to do that though

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

@Yakabuff Thank you.

I just wanted to get data within a certain date range, and I thought I need to create comment_file.txt to run

python3 load_sub.py submission_file.txt

because there is no submission_file.txt in the script folder, and I thought submission_file includes some SQL to get the data I want.

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

ok just to make things clear:

You need to download the pushshift JSON data dumps from one of the sources here: https://github.com/Yakabuff/redarc#download-pushshift-dumps

Then you need to run python3 scripts/load_sub.py <your_pushshift_datadump_file> or python3 scripts/load_comments.py <your_pushshift_datadump_file>

When you are finished inserting the data, run python3 scripts/index.py

Note: the data dumps may be compressed in zstd. unzstd <file> to decompress it. The datadumps may also have inconsistencies/errors in them which you will either have to fix it or tweak the script. Please make a Github issue if you come across these inconsistencies

@philz0918

from redarc.

philz0918 avatar philz0918 commented on June 15, 2024

@Yakabuff

Oh, I've misunderstood some processes!
I appreciate your help, now it works well now! Thanks again.

from redarc.

Yakabuff avatar Yakabuff commented on June 15, 2024

No problem :)

from redarc.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.